Skip to content

Commit

Permalink
GROOVY-11397: add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-milles committed Jun 4, 2024
1 parent 7260b06 commit 63830fe
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/groovy/transform/stc/ClosuresSTCTest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -682,6 +682,20 @@ class ClosuresSTCTest extends StaticTypeCheckingTestCase {
}
}

// GROOVY-11397
void testSAMsInMethodSelection7() {
assertScript '''
interface Action<T> { void run(T t) }
interface Proc { void doSomething() }
void trigger(Action<Proc> action) {
action.run({->})
}
trigger { Proc it ->
it.doSomething()
}
'''
}

// GROOVY-6238
void testDirectMethodCallOnClosureExpression() {
assertScript '''
Expand Down

0 comments on commit 63830fe

Please sign in to comment.