[jira] [Created] (GROOVY-8837) Invalid type inference for redefined generic boundaries
Constantine Plotnikov created GROOVY-8837: - Summary: Invalid type inference for redefined generic boundaries Key: GROOVY-8837 URL: https://issues.apache.org/jira/browse/GROOVY-8837 Project: Groovy Issue Type: Bug Components: Compiler Affects Versions: 2.5.2 Reporter: Constantine Plotnikov Attachments: groovy-bug-generic-extension.zip Static compiler incorrectly calculates type boundary for chain calls with generic types. When method is called, it takes boundary defined in the method of the class (Base in sample), instead of the boundary redefined in subclass (SubClass in sample). The bug was discovered when working with Lombok SuperBuilder generated classes from Groovy. The attached project demonstrate the bug on the smaller sample. Note that Java test infers type correctly, but groovy does not. However, the groovy test works when CompileStatic annotation is disabled. IDEA also shows red code here, but it possibly follows Groovy logic. The bug also affects earlier versions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8837) Invalid type inference for redefined generic boundaries
[ https://issues.apache.org/jira/browse/GROOVY-8837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644631#comment-16644631 ] Constantine Plotnikov commented on GROOVY-8837: --- Maven run successful, but running test from IDEA fails on compile stage. This is strange, I guess I need more investigation for this. Possibly IDEA compiles test differently from maven compiler. > Invalid type inference for redefined generic boundaries > --- > > Key: GROOVY-8837 > URL: https://issues.apache.org/jira/browse/GROOVY-8837 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 2.5.2 >Reporter: Constantine Plotnikov >Priority: Major > Attachments: groovy-bug-generic-extension.zip > > > Static compiler incorrectly calculates type boundary for chain calls with > generic types. When method is called, it takes boundary defined in the method > of the class (Base in sample), instead of the boundary redefined in subclass > (SubClass in sample). > The bug was discovered when working with Lombok SuperBuilder generated > classes from Groovy. The attached project demonstrate the bug on the smaller > sample. > Note that Java test infers type correctly, but groovy does not. However, the > groovy test works when CompileStatic annotation is disabled. > IDEA also shows red code here, but it possibly follows Groovy logic. > The bug also affects earlier versions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (GROOVY-8837) Invalid type inference for redefined generic boundaries
[ https://issues.apache.org/jira/browse/GROOVY-8837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644631#comment-16644631 ] Constantine Plotnikov edited comment on GROOVY-8837 at 10/10/18 8:37 AM: - Maven run successful, but running test from IDEA fails on compile stage. This is strange, I guess I need more investigation for this. Possibly IDEA compiles test differently from maven compiler. I'll post a bug to IDEA too. was (Author: const): Maven run successful, but running test from IDEA fails on compile stage. This is strange, I guess I need more investigation for this. Possibly IDEA compiles test differently from maven compiler. > Invalid type inference for redefined generic boundaries > --- > > Key: GROOVY-8837 > URL: https://issues.apache.org/jira/browse/GROOVY-8837 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 2.5.2 >Reporter: Constantine Plotnikov >Priority: Major > Attachments: groovy-bug-generic-extension.zip > > > Static compiler incorrectly calculates type boundary for chain calls with > generic types. When method is called, it takes boundary defined in the method > of the class (Base in sample), instead of the boundary redefined in subclass > (SubClass in sample). > The bug was discovered when working with Lombok SuperBuilder generated > classes from Groovy. The attached project demonstrate the bug on the smaller > sample. > Note that Java test infers type correctly, but groovy does not. However, the > groovy test works when CompileStatic annotation is disabled. > IDEA also shows red code here, but it possibly follows Groovy logic. > The bug also affects earlier versions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (GROOVY-8837) Invalid type inference for redefined generic boundaries
[ https://issues.apache.org/jira/browse/GROOVY-8837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644631#comment-16644631 ] Constantine Plotnikov edited comment on GROOVY-8837 at 10/10/18 8:39 AM: - Maven run successful, but running test from IDEA fails on compile stage. This is strange, I guess I need more investigation for this. Possibly IDEA compiles test differently from maven compiler. I'll post a bug to IDEA too. I thought they are using standard Groovy compiler. was (Author: const): Maven run successful, but running test from IDEA fails on compile stage. This is strange, I guess I need more investigation for this. Possibly IDEA compiles test differently from maven compiler. I'll post a bug to IDEA too. > Invalid type inference for redefined generic boundaries > --- > > Key: GROOVY-8837 > URL: https://issues.apache.org/jira/browse/GROOVY-8837 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 2.5.2 >Reporter: Constantine Plotnikov >Priority: Major > Attachments: groovy-bug-generic-extension.zip > > > Static compiler incorrectly calculates type boundary for chain calls with > generic types. When method is called, it takes boundary defined in the method > of the class (Base in sample), instead of the boundary redefined in subclass > (SubClass in sample). > The bug was discovered when working with Lombok SuperBuilder generated > classes from Groovy. The attached project demonstrate the bug on the smaller > sample. > Note that Java test infers type correctly, but groovy does not. However, the > groovy test works when CompileStatic annotation is disabled. > IDEA also shows red code here, but it possibly follows Groovy logic. > The bug also affects earlier versions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Comment Edited] (GROOVY-8837) Invalid type inference for redefined generic boundaries
[ https://issues.apache.org/jira/browse/GROOVY-8837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16644631#comment-16644631 ] Constantine Plotnikov edited comment on GROOVY-8837 at 10/10/18 9:01 AM: - Maven run successful, but running test from IDEA fails on compile stage. This is strange, I guess I need more investigation for this. Possibly IDEA compiles test differently from maven compiler. I'll post a bug to IDEA too (posted as https://youtrack.jetbrains.com/issue/IDEA-200247). I thought they are using standard Groovy compiler. was (Author: const): Maven run successful, but running test from IDEA fails on compile stage. This is strange, I guess I need more investigation for this. Possibly IDEA compiles test differently from maven compiler. I'll post a bug to IDEA too. I thought they are using standard Groovy compiler. > Invalid type inference for redefined generic boundaries > --- > > Key: GROOVY-8837 > URL: https://issues.apache.org/jira/browse/GROOVY-8837 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 2.5.2 >Reporter: Constantine Plotnikov >Priority: Major > Attachments: groovy-bug-generic-extension.zip > > > Static compiler incorrectly calculates type boundary for chain calls with > generic types. When method is called, it takes boundary defined in the method > of the class (Base in sample), instead of the boundary redefined in subclass > (SubClass in sample). > The bug was discovered when working with Lombok SuperBuilder generated > classes from Groovy. The attached project demonstrate the bug on the smaller > sample. > Note that Java test infers type correctly, but groovy does not. However, the > groovy test works when CompileStatic annotation is disabled. > IDEA also shows red code here, but it possibly follows Groovy logic. > The bug also affects earlier versions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8837) Invalid type inference for redefined generic boundaries
[ https://issues.apache.org/jira/browse/GROOVY-8837?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645098#comment-16645098 ] Constantine Plotnikov commented on GROOVY-8837: --- This specific maven configuration does use stubs, so it might be reverse: {code:java} generateStubs compile generateTestStubs testCompile{code} > Invalid type inference for redefined generic boundaries > --- > > Key: GROOVY-8837 > URL: https://issues.apache.org/jira/browse/GROOVY-8837 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 2.5.2 >Reporter: Constantine Plotnikov >Priority: Major > Attachments: groovy-bug-generic-extension.zip > > > Static compiler incorrectly calculates type boundary for chain calls with > generic types. When method is called, it takes boundary defined in the method > of the class (Base in sample), instead of the boundary redefined in subclass > (SubClass in sample). > The bug was discovered when working with Lombok SuperBuilder generated > classes from Groovy. The attached project demonstrate the bug on the smaller > sample. > Note that Java test infers type correctly, but groovy does not. However, the > groovy test works when CompileStatic annotation is disabled. > IDEA also shows red code here, but it possibly follows Groovy logic. > The bug also affects earlier versions. -- This message was sent by Atlassian JIRA (v7.6.3#76005)