Skip to content

Commit d1185c3

Browse files
Merge pull request #8851 from dotty-staging/fix-#8846
Fix #8846: Add regression test
2 parents d757454 + 2507e31 commit d1185c3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/pos/i8846.scala

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package example
2+
3+
class X(a: => Any)
4+
5+
class XImpl(
6+
param: Int
7+
) extends X({
8+
def helper(): AutoCloseable = new AutoCloseable {
9+
def close() = println(param)
10+
}
11+
helper()
12+
})

0 commit comments

Comments
 (0)