From c6569209dab006e74ccecc0ede6ce7815ac8629c Mon Sep 17 00:00:00 2001 From: Jan Niehusmann Date: Tue, 13 Nov 2012 22:14:34 +0100 Subject: SI-6663: don't ignore type parameter on selectDynamic invocation Fix mkInvoke to handle selectDynamic calls of the form new C.foo[T].xyz or new C.foo[T].xyz :U (where C extends Dynamic) Without this patch, the type parameter was silently ignored, and possibly inferred to a different. This patch fixes mkInvoke to handle these cases, where ctxTree has the form Select(TypeApply(fun, targs), nme) or Typed(...) --- test/files/neg/t6663.check | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/files/neg/t6663.check (limited to 'test/files/neg/t6663.check') diff --git a/test/files/neg/t6663.check b/test/files/neg/t6663.check new file mode 100644 index 0000000000..aa4faa4a46 --- /dev/null +++ b/test/files/neg/t6663.check @@ -0,0 +1,6 @@ +t6663.scala:16: error: type mismatch; + found : String + required: Int + var v = new C(42).foo[String].get :Int + ^ +one error found -- cgit v1.2.3