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 65: ICE on poorly named "Interface" #114

Closed
consiliens opened this Issue Aug 26, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@consiliens
Contributor

consiliens commented Aug 26, 2011

"
Reported by rogerpack2005, May 30, 2011

Interface Implements_go do
end
$ mirah err

err:1: undefined method `argument_types' for nil:NilClass
Interface Implements_go do
^^^^^^^^^^^^^^^^^^^^^^^^^^^
end
^^^
Mirah::InternalCompilerError: undefined method `argument_types' for nil:NilClass

"

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

@baroquebobcat

This comment has been minimized.

Show comment
Hide comment
@baroquebobcat

baroquebobcat Aug 31, 2011

Member

reproduced.

The problem here is that it thinks you are trying to run the method Interface. The error is because the block looks at the method's argument_types, to try to figure out what kind of thing it should turn into.

It shouldn't raise that error, it should just say Cannot find static method Interface(Implements_go, block) on DashE which would make it more apparent what the problem is.

Member

baroquebobcat commented Aug 31, 2011

reproduced.

The problem here is that it thinks you are trying to run the method Interface. The error is because the block looks at the method's argument_types, to try to figure out what kind of thing it should turn into.

It shouldn't raise that error, it should just say Cannot find static method Interface(Implements_go, block) on DashE which would make it more apparent what the problem is.

baroquebobcat added a commit that referenced this issue Sep 11, 2011

fix for #114
I'm not sure this is the best way to do it, but I think it makes sense. Essentially, it ignores the block when the type is already error on a block call.

also, the test should be part of the core test suite, but I couldn't figure out how to make a failing test for this case in that suite.
@baroquebobcat

This comment has been minimized.

Show comment
Hide comment
@baroquebobcat

baroquebobcat Sep 11, 2011

Member

put in a fix, if it's still a problem, reopen.

Member

baroquebobcat commented Sep 11, 2011

put in a fix, if it's still a problem, reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment