[ 
https://issues.apache.org/jira/browse/GROOVY-12514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18140675#comment-18140675
 ] 

ASF GitHub Bot commented on GROOVY-12514:
-----------------------------------------

testlens-app[bot] commented on PR #3049:
URL: https://github.com/apache/groovy/pull/3049#issuecomment-6720247911

   ## 🚨 Jobs failed without executing tests 🚨
   
   ### Failed Jobs without Test Failures
   
   ❌ [Build and test / lts \(17, 
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42470467001/job/128699782145?pr=3049)
   ❌ [Build and test / lts \(25, 
ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42470467001/job/128699782219?pr=3049)
   ❌ [Build and test for coverage / 
test](https://github.com/apache/groovy/actions/runs/42470467220/job/128699783020?pr=3049)
   ❌ [Check licenses / test 
\(ubuntu-latest\)](https://github.com/apache/groovy/actions/runs/42470466996/job/128699781644?pr=3049)
   ❌ [CodeQL / Analyze \(java, 
21\)](https://github.com/apache/groovy/actions/runs/42470467020/job/128699781962?pr=3049)
   ❌ [Generate SNAPSHOT artifacts / 
dist](https://github.com/apache/groovy/actions/runs/42470467206/job/128699782539?pr=3049)
   ❌ [Lint gate / 
lint](https://github.com/apache/groovy/actions/runs/42470466961/job/128699781770?pr=3049)
   ❌ [Performance check / 
test](https://github.com/apache/groovy/actions/runs/42470466982/job/128699781749?pr=3049)
   ❌ [jmh / test \(bench, 
\\\\.bench\\\\.\)](https://github.com/apache/groovy/actions/runs/42470467028/job/128699782260?pr=3049)
   ❌ [jmh / test \(core-ag, 
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42470467028/job/128699782195?pr=3049)
   ❌ [jmh / test \(core-hz, 
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42470467028/job/128699782163?pr=3049)
   ❌ [jmh / test \(grails-ez, 
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42470467028/job/128699782172?pr=3049)
   ❌ [jmh-classic / test \(core-ag, 
\\\\.perf\\\\.[A-G]\)](https://github.com/apache/groovy/actions/runs/42470466988/job/128699781998?pr=3049)
   ❌ [jmh-classic / test \(core-hz, 
\\\\.perf\\\\.[H-Z]\)](https://github.com/apache/groovy/actions/runs/42470466988/job/128699781805?pr=3049)
   ❌ [jmh-classic / test \(grails-ad, 
\\\\.perf\\\\.grails\\\\.[A-D]\)](https://github.com/apache/groovy/actions/runs/42470466988/job/128699781969?pr=3049)
   ❌ [jmh-classic / test \(grails-ez, 
\\\\.perf\\\\.grails\\\\.[E-Z]\)](https://github.com/apache/groovy/actions/runs/42470466988/job/128699782010?pr=3049)
   
   🏷️ Commit: 3e74e8bf33a350ce84a9bb85d2081cad2cd5e3e9
   ▶️ Tests:  0 executed
   🟡 Checks: 18/24 completed
   
   ### Rerun Controls
   
   Click the checkbox to trigger a rerun:
   
   🔲 **Rerun jobs**
   
   ---
   _Learn more about TestLens at 
[testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   




> STC: qualified this or super naming the current nested class (N.this, N.super 
> inside N) is rejected
> ---------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12514
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12514
>             Project: Groovy
>          Issue Type: Bug
>          Components: Compiler, Static Type Checker
>    Affects Versions: 6.0.0
>            Reporter: Scott Murphy Heiberg
>            Priority: Major
>
> {{N.this}} inside a nested class {{N}} is {{this}}, and {{N.super.m()}} is 
> {{super.m()}}. The type checker rejects both:
> {code:groovy}
> class Base { String m() { 'base' } }
> @groovy.transform.CompileStatic
> class Box {
>     static class N extends Base {
>         String id = 'n'
>         String m() { 'n' }
>         String test() { N.this.id + ' ' + N.super.m() }
>     }
> }
> new Box.N().test()
> {code}
> {code}
> [Static type checking] - No such property: this for Class or static property 
> for class: Box$N
> [Static type checking] - No such property: super for Class or static property 
> for class: Box$N
> {code}
> (plus the errors that follow from them for {{id}} and {{m()}}). Dynamic 
> Groovy returns {{n base}}, and javac accepts the same code. The same errors 
> are reported under {{@TypeChecked}}, for an inner (non-static) class {{N}}, 
> for {{N.this.pm()}} and {{N.this.id = 'w'}}, for {{N.super.p}}, and inside a 
> closure or lambda in {{N}}. {{N.this}} inside an anonymous class created in 
> {{N}} already works, because {{N}} is an outer class there. Seen in 5.0.8, 
> 6.0.0 and master.
> In a top-level class, {{Top.this}} and {{Top.super}} are rejected in every 
> mode ("The usage of 'Class.this' and 'Class.super' is only allowed in 
> nested/inner classes."), as GROOVY-4321 decided and {{StaticThisTest}} pins, 
> so they are not part of this issue.
> Expected: under {{@TypeChecked}} and {{@CompileStatic}}, {{N.this}} and 
> {{N.super}} inside the nested class {{N}} mean {{this}} and {{super}}, as in 
> dynamic Groovy, except in a static context, where they stay an error.
> PR: https://github.com/apache/groovy/pull/3049



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to