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

Issue 74:ICE with macros within a class def #123

Closed
consiliens opened this issue Aug 26, 2011 · 1 comment
Closed

Issue 74:ICE with macros within a class def #123

consiliens opened this issue Aug 26, 2011 · 1 comment

Comments

@consiliens
Copy link
Contributor

"
Reported by rogerpack2005, Jun 1, 2011

$ cat yo_mir 

class A
  macro def foo? 
    quote { isFoo } 
  end 
  def foo?
    true
  end
end
A.new.foo?
$ mirah yo_mir 
yo_mir:6: undefined method `unreachable?' for #<Mirah::AST::InlineCode:0x498b5a73>
  def foo?
^^^^^^^^^^^
    true
^^^^^^^^^
  end
^^^^^
Mirah::InternalCompilerError: undefined method `unreachable?' for #<Mirah::AST::InlineCode:0x498b5a73>
            infer at /Users/rogerdpack/.rvm/gems/jruby-1.6.0/gems/mirah-0.0.7-java/lib/mirah/typer.rb:300
...

"

http://code.google.com/p/mirah/issues/detail?id=74

@baroquebobcat
Copy link
Member

Maybe it should say something like 'a method or macro with that name/signature is already defined'.

We probably also want to catch the same issue, but different error on duplicate method signatures

class A
  def foo? 
    false 
  end 
  def foo?
    true
  end
end

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

2 participants