diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t7441.check | 6 | ||||
-rw-r--r-- | test/files/neg/t7441.scala | 7 | ||||
-rw-r--r-- | test/files/neg/t7509.check | 12 | ||||
-rw-r--r-- | test/files/neg/t7509.scala | 4 |
4 files changed, 16 insertions, 13 deletions
diff --git a/test/files/neg/t7441.check b/test/files/neg/t7441.check deleted file mode 100644 index f259457197..0000000000 --- a/test/files/neg/t7441.check +++ /dev/null @@ -1,6 +0,0 @@ -t7441.scala:4: error: type mismatch; - found : Int(1) - required: List[Any] - def test = apply(1) - ^ -one error found diff --git a/test/files/neg/t7441.scala b/test/files/neg/t7441.scala deleted file mode 100644 index dad7421e3f..0000000000 --- a/test/files/neg/t7441.scala +++ /dev/null @@ -1,7 +0,0 @@ -object Test { - object Bar { - def apply(xs: List[Any]): Int = 0 - def test = apply(1) - } - implicit def foo = 1 -} diff --git a/test/files/neg/t7509.check b/test/files/neg/t7509.check new file mode 100644 index 0000000000..eaa6303cf5 --- /dev/null +++ b/test/files/neg/t7509.check @@ -0,0 +1,12 @@ +t7509.scala:3: error: inferred type arguments [Int] do not conform to method crash's type parameter bounds [R <: AnyRef] + crash(42) + ^ +t7509.scala:3: error: type mismatch; + found : Int(42) + required: R + crash(42) + ^ +t7509.scala:3: error: could not find implicit value for parameter ev: R + crash(42) + ^ +three errors found diff --git a/test/files/neg/t7509.scala b/test/files/neg/t7509.scala new file mode 100644 index 0000000000..3cba801ea7 --- /dev/null +++ b/test/files/neg/t7509.scala @@ -0,0 +1,4 @@ +object NMWE { + def crash[R <: AnyRef](f: R)(implicit ev: R): Any = ??? + crash(42) +} |