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

IR builder fails on zsuper with kwargs from within block #2209

Closed
headius opened this issue Nov 17, 2014 · 0 comments
Closed

IR builder fails on zsuper with kwargs from within block #2209

headius opened this issue Nov 17, 2014 · 0 comments
Labels

Comments

@headius
Copy link
Member

@headius headius commented Nov 17, 2014

Here's the code and output. It's not too complicated, but it crashes the builder. Getting late here for me so I can't fix it right now.

$ ruby -e "class X1; def foo(a: 1, b:); p a, b; end; end; class X2 < X1; def foo(a:, b:); 1.times { super }; end; end; X2.new.foo(a:3, b:4)"
IRBuilder.java:3513:in `adjustVariableDepth': java.lang.ClassCastException: org.jruby.ir.operands.Hash cannot be cast to org.jruby.ir.operands.DepthCloneable
    from IRBuilder.java:81:in `access$000'
    from IRBuilder.java:3475:in `run'
    from IRBuilder.java:939:in `receiveBreakException'
    from IRBuilder.java:3488:in `buildZSuperIfNest'
    from IRBuilder.java:3501:in `buildZSuper'
    from IRBuilder.java:456:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:2700:in `buildNewline'
    from IRBuilder.java:418:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:2534:in `buildIter'
    from IRBuilder.java:407:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:2244:in `setupCallClosure'
    from IRBuilder.java:989:in `buildCall'
    from IRBuilder.java:371:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:2700:in `buildNewline'
    from IRBuilder.java:418:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:1685:in `defineMethodInner'
    from IRBuilder.java:1702:in `defineNewMethod'
    from IRBuilder.java:1706:in `buildDefn'
    from IRBuilder.java:384:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:2700:in `buildNewline'
    from IRBuilder.java:418:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:3536:in `buildModuleOrClassBody'
    from IRBuilder.java:1115:in `buildClass'
    from IRBuilder.java:373:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:2700:in `buildNewline'
    from IRBuilder.java:418:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:865:in `buildBlock'
    from IRBuilder.java:369:in `buildOperand'
    from IRBuilder.java:500:in `build'
    from IRBuilder.java:3259:in `buildRoot'
    from IRTranslator.java:26:in `execute'
    from Ruby.java:850:in `runInterpreter'
    from Ruby.java:858:in `runInterpreter'
    from Ruby.java:754:in `runNormally'
    from Ruby.java:559:in `runFromMain'
    from Main.java:405:in `doRunFromMain'
    from Main.java:300:in `internalRun'
    from Main.java:227:in `run'
    from Main.java:199:in `main'
@headius headius added the ir label Nov 17, 2014
@headius headius added this to the JRuby 9.0.0.0 milestone Nov 17, 2014
@headius headius removed this from the JRuby 9.0.0.0 milestone Jan 16, 2015
@headius headius added this to the JRuby 9.0.0.0-pre1 milestone Jan 16, 2015
@headius headius added this to the JRuby 9.0.0.0-pre1 milestone Jan 16, 2015
@headius headius removed this from the JRuby 9.0.0.0 milestone Jan 16, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant