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

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

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

   ## ✅ All tests passed ✅
   
   🏷️ Commit: 47dffb377e9d4857bbc69b33fb571ba920815c28
   ▶️ Tests:  113057 executed
   ⚪️ Checks: 31/31 completed
   
   ---
   _Learn more about TestLens at 
[testlens.app/docs](https://testlens.app/docs/features/pr-comment/)._
   




> Various combinations of type-checking and static-compilation do not correctly 
> combine
> -------------------------------------------------------------------------------------
>
>                 Key: GROOVY-12292
>                 URL: https://issues.apache.org/jira/browse/GROOVY-12292
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 2.5.23, 3.0.25, 5.0.3, 4.0.31
>            Reporter: Björn Kautler
>            Assignee: Paul King
>            Priority: Major
>              Labels: breaking
>
> Given this code: 
> https://groovyconsole.dev/?g=groovy_5_0&codez=eNrtkl8LgjAUxd_3KS4-6YvSv_fAXiKCQL_AmqtG6WQbgYTfPTXNWqUWRAXt8XLO2bk_LgtjLhSsBef7xFYCR3LFRWi7PIzZjk6SCIeMINYs8xRWDSo_iam7oWRLg0ojC0eDlEXrOQ-o7c2mC4TGWh-yw1KCT6XqwQFB9sbXVfJRQFeATasUABiGrbinRBYtTasYpuiO2cz_tM4Ry24Rl0tWVvLQCo4D5PQpUCG4eJSllQnayqQ1rBJFzaqvsapo_mFp29TIBm9A9sOwLqvUkIYvQ2ou-yy1J9K05T-P8-byRl9wea8haz3eDmyOjbPXaQ
> {code:groovy}
> import groovy.transform.CompileDynamic
> import groovy.transform.CompileStatic
> import groovy.transform.TypeChecked
> import static groovy.transform.TypeCheckingMode.SKIP
> @CompileDynamic
> class Test1 {
>     @CompileStatic
>     def a() {
>       "".toStrings()
>     }
>     @CompileStatic(SKIP)
>     def b() {
>       "".toStrings()
>     }
>     @TypeChecked
>     def c() {
>       "".toStrings() // compile error
>     }
>     @TypeChecked(SKIP)
>     def d() {
>       "".toStrings()
>     }
> }
> @CompileStatic
> class Test2 {
>     @CompileDynamic
>     def a() {
>       "".toStrings()
>     }
>     @CompileStatic(SKIP)
>     def b() {
>       "".toStrings()
>     }
>     @TypeChecked
>     def c() {
>       "".toStrings() // compile error
>     }
>     @TypeChecked(SKIP)
>     def d() {
>       "".toStrings()
>     }
> }
> @CompileStatic(SKIP)
> class Test3 {
>     @CompileDynamic
>     def a() {
>       "".toStrings()
>     }
>     @CompileStatic
>     def b() {
>       "".toStrings()
>     }
>     @TypeChecked
>     def c() {
>       "".toStrings() // compile error
>     }
>     @TypeChecked(SKIP)
>     def d() {
>       "".toStrings()
>     }
> }
> @TypeChecked
> class Test4 {
>     @CompileDynamic
>     def a() {
>       "".toStrings() // compile error
>     }
>     @CompileStatic
>     def b() {
>       "".toStrings() // compile error
>     }
>     @CompileStatic(SKIP)
>     def c() {
>       "".toStrings() // compile error
>     }
>     @TypeChecked(SKIP)
>     def d() {
>       "".toStrings()
>     }
> }
> @TypeChecked(SKIP)
> class Test5 {
>     @CompileDynamic
>     def a() {
>       "".toStrings()
>     }
>     @CompileStatic
>     def b() {
>       "".toStrings()
>     }
>     @CompileStatic(SKIP)
>     def c() {
>       "".toStrings()
>     }
>     @TypeChecked
>     def d() {
>       "".toStrings()
>     }
> }
> {code}
> I'd say the annotations do not combine correctly.
> For example {{@CompileDynamic}} or {{@CompileStatic(SKIP)}} or 
> {{@TypeChecked(SKIP)}} on class and {{@CompileStatic}} on method does not do 
> type-check?
> And also {{@TypeChecked(SKIP)}} on class and {{@TypeChecked}} on method does 
> not do type-check?
> At least those 4 combinations appear to be fishy to me.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to