You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "mgroovy (JIRA)" <ji...@apache.org> on 2018/09/06 18:07:00 UTC

[jira] [Updated] (GROOVY-8776) @MapConstructor: Creating static inner class instance => VerifyError: Bad type on operand stack CTE

     [ https://issues.apache.org/jira/browse/GROOVY-8776?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

mgroovy updated GROOVY-8776:
----------------------------
    Summary: @MapConstructor: Creating static inner class instance => VerifyError: Bad type on operand stack CTE  (was: @MapConstructor: Creating inner class instance => VerifyError: Bad type on operand stack CTE)

> @MapConstructor: Creating static inner class instance => VerifyError: Bad type on operand stack CTE
> ---------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-8776
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8776
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 2.5.2
>            Reporter: mgroovy
>            Priority: Minor
>
> {code:java}
> import groovy.transform.CompileStatic
> import groovy.transform.MapConstructor
> @CompileStatic // static bug only
> class GroovyMapConstructorCheck {
>  @MapConstructor
>  static class Goo {
>   final int x0
>   @Override
>   String toString() {
>    return "Goo(|$x0|)"
>   }
>  }
> }
> println new GroovyMapConstructorCheck.Goo(x0:123){code}
> Throws
> {quote}
> java.lang.VerifyError: Bad type on operand stack
>  Exception Details:
>  Location:
>  GroovyMapConstructorCheck$Goo.<init>(Ljava/util/Map;)V @57: invokevirtual
>  Reason:
>  Type 'GroovyMapConstructorCheck$Goo' (current frame, stack[0]) is not assignable to 'groovy/lang/Closure'
>  Current Frame:
>  bci: @57
>  flags: \{ }
>  locals:
> { 'GroovyMapConstructorCheck$Goo', 'java/lang/Object', 'groovy/lang/MetaClass' }
> stack:
> { 'GroovyMapConstructorCheck$Goo' }
> Bytecode:
>  0x0000000: 2ab7 0015 2ab6 0019 4d2c 2a5f b500 1b2c
>  0x0000010: 572b c700 0704 a700 0403 9900 1703 bd00
>  0x0000020: 04b8 0021 4e2d 1223 b800 27c0 0023 4c2d
>  0x0000030: 572a 2bb8 002d 0157 2ab6 0033 c000 3512
>  0x0000040: 36b9 003c 0200 9900 202a b600 33c0 0035
>  0x0000050: 1236 b900 4002 003a 0419 04b8 0046 2a5f
>  0x0000060: b500 4819 0457 b1 
>  Stackmap Table:
>  full_frame(@25,
> {Object[#2],Object[#56],Object[#78]}
> ,{})
>  same_locals_1_stack_item_frame(@26,Integer)
>  full_frame(@49,
> {Object[#2],Object[#4],Object[#78]}
> ,{})
>  same_frame(@102)
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)