From 89540268e6c49fb92b9ca61249e46bb59981bf5a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 4 May 2016 12:09:52 +0200 Subject: Downwards comparisons for implicit search and overloading resolution Compare selected contravariant arguments as if they were covariant. Which ones is explained in the doc comment for method `isAsSpecificValueType` in Applications.scala. This has the same motivation than what @paulp proposed around 2012. The solution is a bit different from the one proposed then because it only affects top-level parameters. --- test/dotc/tests.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/dotc/tests.scala') diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index 3528dfa72..4ada2d982 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -119,8 +119,8 @@ class tests extends CompilerTest { @Test def neg_typedIdents() = compileDir(negDir, "typedIdents") val negCustomArgs = negDir + "customArgs/" - @Test def neg_typers = compileFile(negCustomArgs, "typers")(allowDoubleBindings) - @Test def neg_overrideClass = compileFile(negCustomArgs, "overrideClass", List("-language:Scala2")) + @Test def neg_typers() = compileFile(negCustomArgs, "typers")(allowDoubleBindings) + @Test def neg_overrideClass = compileFile(negCustomArgs, "overrideClass", scala2mode) @Test def neg_autoTupling = compileFile(negCustomArgs, "autoTuplingTest", args = "-language:noAutoTupling" :: Nil) @Test def neg_i1050 = compileFile(negCustomArgs, "i1050", List("-strict")) @Test def neg_i1240 = compileFile(negCustomArgs, "i1240")(allowDoubleBindings) -- cgit v1.2.3