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

Paul King updated GROOVY-10218:
-------------------------------
    Fix Version/s: 3.0.10

> BUG! exception in phase 'instruction selection' when non-existent method 
> called
> -------------------------------------------------------------------------------
>
>                 Key: GROOVY-10218
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10218
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.8, 4.0.0-beta-1, 3.0.9
>         Environment: linux
>            Reporter: Ian
>            Assignee: Paul King
>            Priority: Major
>             Fix For: 4.0.0-beta-2, 3.0.10
>
>
> My file "ite.groovy":
> {noformat}
> import groovy.transform.TypeChecked
> interface A {}
> @TypeChecked
> trait B implements A {
>   def foo() {
>     bar()
>   }
> }
> class C implements B {}
> println new C().foo()
> {noformat}
> Fails to compile (as it should) but does not give a helpful error message:
> {noformat}
> $ groovy ite.groovy 
> Caught: BUG! exception in phase 'instruction selection' in source unit '<my 
> path>/ite.groovy' ClassNode#getTypeClass for A called before the type class 
> is set
> BUG! exception in phase 'instruction selection' in source unit '<my 
> path>/ite.groovy' ClassNode#getTypeClass for A called before the type class 
> is set
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43){noformat}
> Remove the @TypeChecked and it gives a coherent and useful error. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to