From 347f01d46408d2430be3aea0184f5a6b8d9bbe81 Mon Sep 17 00:00:00 2001 From: Lukas Rytz Date: Sun, 12 Oct 2014 21:49:04 +0200 Subject: SI-8900 Don't assert !isDelambdafyFunction, it may not be accurate The implementations of isAnonymousClass, isAnonymousFunction, isDelambdafyFunction and isDefaultGetter check if a specific substring (eg "$lambda") exists in the symbol's name. SI-8900 shows an example where a class ends up with "$lambda" in its name even though it's not a delambdafy lambda class. In this case the conflict seems to be introduced by a macro. It is possible that the compiler itself never introduces such names, but in any case, the above methods should be implemented more robustly. This commit is band-aid, it fixes one specific known issue, but there are many calls to the mentioned methods across the compiler which are potentially wrong. Thanks to Jason for the test case! --- test/files/pos/t8900.scala | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/files/pos/t8900.scala (limited to 'test') diff --git a/test/files/pos/t8900.scala b/test/files/pos/t8900.scala new file mode 100644 index 0000000000..376bd786f2 --- /dev/null +++ b/test/files/pos/t8900.scala @@ -0,0 +1,11 @@ +package foo +package lambdaking + +class Test { + def byname(b: => Any) = ??? + def foo: Any = { + def bar: Any = { + byname(bar) + } + } +} -- cgit v1.2.3