diff --git a/src/test/groovy/transform/stc/ClosuresSTCTest.groovy b/src/test/groovy/transform/stc/ClosuresSTCTest.groovy index b7e33b4fd29..00583880a68 100644 --- a/src/test/groovy/transform/stc/ClosuresSTCTest.groovy +++ b/src/test/groovy/transform/stc/ClosuresSTCTest.groovy @@ -682,6 +682,20 @@ class ClosuresSTCTest extends StaticTypeCheckingTestCase { } } + // GROOVY-11397 + void testSAMsInMethodSelection7() { + assertScript ''' + interface Action { void run(T t) } + interface Proc { void doSomething() } + void trigger(Action action) { + action.run({->}) + } + trigger { Proc it -> + it.doSomething() + } + ''' + } + // GROOVY-6238 void testDirectMethodCallOnClosureExpression() { assertScript '''