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

Define @@setter with class_getter #405

Merged
merged 2 commits into from
Jun 11, 2020

Conversation

Blacksmoke16
Copy link
Contributor

@Blacksmoke16 Blacksmoke16 commented Jun 10, 2020

Reboot of #345. Was getting:

Showing last frame. Use --error-trace for full trace.

In lib/granite/src/granite/select.cr:19:5

19 | @@select
^
Error: can't infer the type of class variable '@@select' of Granite::Base.class

The type of a class variable, if not declared explicitly with
`@@select : Type`, is inferred from assignments to it across
the whole program.

...

Other assignments have no effect on its type.

can't infer the type of class variable '@@select' of Granite::Base.class

When working on some Athena stuff.

Use the getter versus using the class var directly
@drujensen drujensen merged commit 9c30762 into amberframework:master Jun 11, 2020
@Blacksmoke16 Blacksmoke16 deleted the use-class-var-getters branch June 11, 2020 12:43
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.

3 participants