From c46145f0408b30bbd126d293ccf67792f307479a Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Tue, 24 Nov 2009 09:09:49 +0000 Subject: close #2665 and close #2667: use weak conforman... close #2665 and close #2667: use weak conformance in polymorphic case of isApplicable reviewed by: odersky exprTypeArgs now takes a comparison function: isWeaklyCompatible is ) passed in isApplicable's typesCompatible (to mimic what happens in the ) monomorphic case Martin: please review as this is different from my ) original proposal (that one broke type inference, this one passes all ) tests and does not slow down quick.comp ) --- test/files/pos/t2665.scala | 3 +++ test/files/pos/t2667.scala | 6 ++++++ 2 files changed, 9 insertions(+) create mode 100644 test/files/pos/t2665.scala create mode 100644 test/files/pos/t2667.scala (limited to 'test/files') diff --git a/test/files/pos/t2665.scala b/test/files/pos/t2665.scala new file mode 100644 index 0000000000..3163e31326 --- /dev/null +++ b/test/files/pos/t2665.scala @@ -0,0 +1,3 @@ +object Test { + val x: Unit = Array("") +} \ No newline at end of file diff --git a/test/files/pos/t2667.scala b/test/files/pos/t2667.scala new file mode 100644 index 0000000000..b214cc7f37 --- /dev/null +++ b/test/files/pos/t2667.scala @@ -0,0 +1,6 @@ +object A { + def foo(x: Int, y: Int*): Int = 45 + def foo[T](x: T*): Int = 55 + + val x: Unit = foo(23, 23f) +} \ No newline at end of file -- cgit v1.2.3