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

Reject annotations on ivars defined in base class #9502

Merged
merged 3 commits into from Jul 6, 2020

Conversation

waj
Copy link
Member

@waj waj commented Jun 18, 2020

Following up from #9499

This raises an error instead of silently ignoring annotations on instance variables defined in a base class.

@waj waj added this to the 1.0.0 milestone Jun 30, 2020
@waj waj merged commit e7db73f into crystal-lang:master Jul 6, 2020
@waj waj deleted the fix/error-ivar-annotation-on-subclass branch July 6, 2020 13:35
asterite pushed a commit to asterite/crystal-1 that referenced this pull request Jul 18, 2020
cmur2 added a commit to spoved/crafana.cr that referenced this pull request Jan 28, 2021
Due to crystal-lang/crystal#9502 this throws an error now compiling with Crystal 0.36.0:
```
In src/crafana/models/panels/graph.cr:32:5

 32 | @[JSON::Field(key: "gridPos")]
      ^
Error: can't annotate @grid_pos in Crafana::Graph because it was first defined in Crafana::Panel
```

I'm not aware of any downsides of removing this duplicate definition.
cmur2 added a commit to cmur2/crafana.cr that referenced this pull request Jan 28, 2021
Due to crystal-lang/crystal#9502 this throws an error now compiling with Crystal 0.36.0:
```
In src/crafana/models/panels/graph.cr:32:5

 32 | @[JSON::Field(key: "gridPos")]
      ^
Error: can't annotate @grid_pos in Crafana::Graph because it was first defined in Crafana::Panel
```

I'm not aware of any downsides of removing this duplicate definition.
kalinon pushed a commit to spoved/crafana.cr that referenced this pull request Jan 30, 2021
Due to crystal-lang/crystal#9502 this throws an error now compiling with Crystal 0.36.0:
```
In src/crafana/models/panels/graph.cr:32:5

 32 | @[JSON::Field(key: "gridPos")]
      ^
Error: can't annotate @grid_pos in Crafana::Graph because it was first defined in Crafana::Panel
```

I'm not aware of any downsides of removing this duplicate definition.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants