Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nullability specifiers not supported in %property #64

Open
jacobcxdev opened this issue May 21, 2020 · 3 comments
Open

Nullability specifiers not supported in %property #64

jacobcxdev opened this issue May 21, 2020 · 3 comments

Comments

@jacobcxdev
Copy link

What are the steps to reproduce this issue?

%property (nonatomic, retain) UITextField * _Nonnull textField;

What happens?

iDUTagCreationAlertCollectionViewController.x:19:1: error: expected identifier or '('
%property (nonatomic, retain) UITextField * _Nonnull textField;
^

What were you expecting to happen?

Successful compilation.

Any logs, error output, etc?

iDUTagCreationAlertCollectionViewController.x:19:1: error: expected identifier or '('
%property (nonatomic, retain) UITextField * _Nonnull textField;
^

Any other comments?

Nope.

What versions of software are you using?

Operating System: macOS 10.15.4

Toolchain Version:

SDK Version: 13.4

@DGh0st
Copy link

DGh0st commented May 21, 2020

It would be nice to also have:

%property (nonatomic, retain, nonnull) UITextField *textField;

@NSExceptional
Copy link
Contributor

NSExceptional commented May 22, 2020

%property is not the place to put nullability specifies, imo. That code is only used to generate other code; it's not the interface you use to access the resulting property itself. And since nullability is purely a compile-time feature, it wouldn't change anything even if you could put it there.

You should be putting nullability specifiers in the @interface for whatever class this is.

@jacobcxdev
Copy link
Author

%property is not the place to put nullability specifies, imo. That code is only used to generate other code; it's not the interface you use to access the resulting property itself. And since nullability is purely a compile-time feature, it wouldn't change anything even if you could put it there.

You should be putting nullability specifiers in the @interface for whatever class this is.

While I agree, I think that it wouldn't hurt to support the nullability specifiers. For the %property syntax to be intuitive, it should follow the syntax of @property, including support for nullability specifiers — it would just mean one less place where Logos can break.

@uroboro uroboro transferred this issue from theos/theos Jun 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants