From f13c07fe29d27bdc75423be6d3bf5458175bec90 Mon Sep 17 00:00:00 2001 From: Jason Zaugg Date: Sun, 11 May 2014 13:50:09 +0200 Subject: SI-8578 Avoid fresh name clashes under -Ydelambdafy:method It is important to append the fresh 'N' after '$'. Otherwise, we find out the hard way that ("foo$11" + "1") == ("foo$1" + "11"). --- test/files/pos/t8578.flags | 1 + test/files/pos/t8578.scala | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 test/files/pos/t8578.flags create mode 100644 test/files/pos/t8578.scala (limited to 'test/files') diff --git a/test/files/pos/t8578.flags b/test/files/pos/t8578.flags new file mode 100644 index 0000000000..48b438ddf8 --- /dev/null +++ b/test/files/pos/t8578.flags @@ -0,0 +1 @@ +-Ydelambdafy:method diff --git a/test/files/pos/t8578.scala b/test/files/pos/t8578.scala new file mode 100644 index 0000000000..879b5f5550 --- /dev/null +++ b/test/files/pos/t8578.scala @@ -0,0 +1,18 @@ +class DuplicateClassName { + () => { + {() => ()} + {() => ()} + {() => ()} + {() => ()} + {() => ()} + {() => ()} + {() => ()} + {() => ()} + {() => ()} + {() => () => ()} + {() => ()} + } +} +// Was: +// Different class symbols have the same bytecode-level internal name: +// name: DuplicateClassName$lambda$$$anonfun$111 \ No newline at end of file -- cgit v1.2.3