From 639e52ae7e128025f6eb57957a590b808d83a9a4 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Tue, 27 Oct 2015 14:37:44 +1000 Subject: SI-9178 Don't eta expand param-less method types to SAMs Otherwise, we can end up with a subtle source incompatibility with the pre-SAM regime. Arguably we should phase out eta expansion to Function0 as well, but I'll leave that for another day. --- test/files/pos/t9178b.flags | 1 + test/files/pos/t9178b.scala | 7 +++++++ 2 files changed, 8 insertions(+) create mode 100644 test/files/pos/t9178b.flags create mode 100644 test/files/pos/t9178b.scala (limited to 'test/files/pos') diff --git a/test/files/pos/t9178b.flags b/test/files/pos/t9178b.flags new file mode 100644 index 0000000000..48fd867160 --- /dev/null +++ b/test/files/pos/t9178b.flags @@ -0,0 +1 @@ +-Xexperimental diff --git a/test/files/pos/t9178b.scala b/test/files/pos/t9178b.scala new file mode 100644 index 0000000000..cbeaed4f17 --- /dev/null +++ b/test/files/pos/t9178b.scala @@ -0,0 +1,7 @@ +abstract class Test{ + val writeInput: java.io.OutputStream => Unit + def getOutputStream(): java.io.OutputStream + + writeInput(getOutputStream) +} + -- cgit v1.2.3