You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2020/12/24 04:56:00 UTC

[jira] [Resolved] (GROOVY-9863) arithmetic using an implicit getter fails to compile with "BUG! exception in phase 'class generation'" under static compilation

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

Eric Milles resolved GROOVY-9863.
---------------------------------
    Fix Version/s: 4.0.0-alpha-3
                   3.0.8
       Resolution: Fixed

> arithmetic using an implicit getter fails to compile with "BUG! exception in phase 'class generation'" under static compilation
> -------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-9863
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9863
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler
>    Affects Versions: 3.0.5, 3.0.6, 3.0.7
>            Reporter: Jason Garrett
>            Assignee: Eric Milles
>            Priority: Minor
>             Fix For: 3.0.8, 4.0.0-alpha-3
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The following code:
> {code:java}
> package example
> import groovy.transform.CompileStatic
> @CompileStatic
> class ImplicitGetterExample {
>    double getSomeValue() {
>       return 0.0d
>    }
>    void example() {
>       1.0d + someValue
>    }
> }
> {code}
> fails to compile with this message:
> {noformat}
> BUG! exception in phase 'class generation' in source unit '/Users/jasongarrett/scratch/scratch/src/main/groovy/example/ImplicitGetterExample.groovy' At line 12 column 3
> On receiver: 1.0 with message: plus and arguments: someValue
> This method should not have been called. Please try to create a simple example reproducing
> this error and file a bug report at https://issues.apache.org/jira/browse/GROOVY{noformat}
> This class compiles successfully with versions 3.0.4 and earlier.



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