diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t2070.check | 5 | ||||
-rw-r--r-- | test/files/neg/t2070.scala | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/test/files/neg/t2070.check b/test/files/neg/t2070.check new file mode 100644 index 0000000000..bd049409a8 --- /dev/null +++ b/test/files/neg/t2070.check @@ -0,0 +1,5 @@ +t2070.scala:8: error: The kind of trait T does not conform to the expected kind of type T[X] in trait A. +t2070.B.T's type parameters do not match type T's expected parameters: type X (in object B) has one type parameter, but type X (in trait A) has none + trait T[X[_]] + ^ +one error found diff --git a/test/files/neg/t2070.scala b/test/files/neg/t2070.scala new file mode 100644 index 0000000000..c810568edc --- /dev/null +++ b/test/files/neg/t2070.scala @@ -0,0 +1,10 @@ +object t2070 { + trait A { + type T[X] + def f(x : T[Int]) = x + } + + object B extends A { + trait T[X[_]] + } +} |