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

Macro method is hidden by instance method #4739

Closed
mosop opened this issue Jul 23, 2017 · 2 comments
Closed

Macro method is hidden by instance method #4739

mosop opened this issue Jul 23, 2017 · 2 comments
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. status:discussion topic:stdlib:macros

Comments

@mosop
Copy link
Contributor

mosop commented Jul 23, 2017

In Crystal 0.23.1,

class Parent
  macro foo
  end
end

class Child < Parent
  def foo
  end
end

class GrandChild < Child
  foo
end

causes the compile error:

Error in src/test.cr:12: undefined local variable or method 'foo'

  foo
  ^~~

There was no problem in Crystal 0.23.0.

OS X El Capitan.

@straight-shoota
Copy link
Member

Looks like this might be related to #4722 and #4639

@RX14
Copy link
Contributor

RX14 commented Jul 24, 2017

I think it is related but i'm pretty sure it's not a duplicate.

@RX14 RX14 added kind:bug A bug in the code. Does not apply to documentation, specs, etc. status:discussion topic:stdlib:macros labels Jul 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. status:discussion topic:stdlib:macros
Projects
None yet
Development

No branches or pull requests

3 participants