Skip to content

Constants as a default value issue #18

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

Closed
ChebanovDD opened this issue Jan 23, 2024 · 0 comments
Closed

Constants as a default value issue #18

ChebanovDD opened this issue Jan 23, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ChebanovDD
Copy link
Contributor

Describe the bug

It is impossible to use constants as the default value for UxmlAttribute.

The following code generates: error UXMLG003: UxmlAttribute for 'MaxTextLength' property was not created. The default property and attribute value must be of the same type.

private const int DefaultMaxLength = -1;
        
[UxmlAttribute(DefaultMaxLength)]
private int MaxTextLength { get; set; }
@ChebanovDD ChebanovDD added the bug Something isn't working label Jan 23, 2024
@ChebanovDD ChebanovDD self-assigned this Jan 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant