From 5dae5f2953438e8a1443075b44b310965c2cf863 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Tue, 21 Feb 2017 10:28:56 +0100 Subject: Fix #2000: Make implicit and non-implicit functions incomparable with <:< Implicit and non-implicit functions are incomparable with <:<, but are treated as equivalent with `matches`. This means implicit and non-implicit functions of the same types override each other, but RefChecks will give an error because their types are not subtypes. Also contains a test for #2002. --- tests/neg/customArgs/i2002.scala | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/neg/customArgs/i2002.scala (limited to 'tests/neg/customArgs') diff --git a/tests/neg/customArgs/i2002.scala b/tests/neg/customArgs/i2002.scala new file mode 100644 index 000000000..5561b77b8 --- /dev/null +++ b/tests/neg/customArgs/i2002.scala @@ -0,0 +1,4 @@ +class Test { + def foo(i: Int): Int = i + def foo(implicit i: Int): Int = i // error +} -- cgit v1.2.3