Skip to content

Commit 2143728

Browse files
committed
Add printer test for lambda that might be confused for a self type
1 parent e52fec1 commit 2143728

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/pos/lambda.decompiled

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ out/posTestFromTasty/pos/lambda/foo/Foo.class
33
--------------------------------------------------------------------------------
44
package foo {
55
class Foo() {
6+
{
7+
(x: Int) =>
8+
{
9+
2
10+
}
11+
}
612
val a: Int => Int = (x: Int) => x.*(x)
713
}
814
}

tests/pos/lambda.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
package foo
22
class Foo {
3+
{
4+
(x: Int) => 2
5+
}
36
val a = (x: Int) => x * x
47
}

0 commit comments

Comments
 (0)