diff options
Diffstat (limited to 'tests/run/non-jvm-sam-non-apply.scala')
-rw-r--r-- | tests/run/non-jvm-sam-non-apply.scala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/run/non-jvm-sam-non-apply.scala b/tests/run/non-jvm-sam-non-apply.scala new file mode 100644 index 000000000..e3bfac928 --- /dev/null +++ b/tests/run/non-jvm-sam-non-apply.scala @@ -0,0 +1,11 @@ +// shouldn't result in an abstract method error when run +abstract class NonJVMSam { + def foo(x: Int): Int +} + +object Test { + def main(args: Array[String]): Unit = { + val f: NonJVMSam = x => x + 1 + println(f.foo(3)) + } +} |