From baee820b32f6e71907658ad6386e0d79e726e761 Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Wed, 10 Feb 2016 17:35:24 -0800 Subject: SI-9540 typedFunction is erasure aware When typer is running during erasure, must assign erased FunctionType in typedFunction. This removes a bunch of unneeded casts now we no longer assign a half-erased FunctionType. I poked around a bit, and it looks like erasure doesn't want typer to erase built-in types (like Unit/Any/Nothing). They are already treated specially during erasure. --- test/files/run/delambdafy_t6028.check | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/files/run') diff --git a/test/files/run/delambdafy_t6028.check b/test/files/run/delambdafy_t6028.check index c8c4b1cb4c..b5a6e4b64e 100644 --- a/test/files/run/delambdafy_t6028.check +++ b/test/files/run/delambdafy_t6028.check @@ -11,7 +11,7 @@ package { def foo(methodParam: String): Function0 = { val methodLocal: String = ""; { - (() => T.this.$anonfun$1(methodParam, methodLocal)).$asInstanceOf[Function0]() + (() => T.this.$anonfun$1(methodParam, methodLocal)) } }; def bar(barParam: String): Object = { @@ -21,7 +21,7 @@ package { def tryy(tryyParam: String): Function0 = { var tryyLocal: runtime.ObjectRef = scala.runtime.ObjectRef.create(""); { - (() => T.this.$anonfun$2(tryyParam, tryyLocal)).$asInstanceOf[Function0]() + (() => T.this.$anonfun$2(tryyParam, tryyLocal)) } }; final private[this] def $anonfun$1(methodParam$1: String, methodLocal$1: String): String = T.this.classParam.+(T.this.field()).+(methodParam$1).+(methodLocal$1); -- cgit v1.2.3