diff options
author | Paul Phillips <paulp@improving.org> | 2011-02-18 19:54:55 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-02-18 19:54:55 +0000 |
commit | 38c668fcc7df015f57cb7891154e261cd0a1fd76 (patch) | |
tree | e4a66fb6f5bfd9ab73eb507492ea38d3f75d72ec /test/files/neg | |
parent | 5ba01cd7c8da4109af4c1724084404d90c55339b (diff) | |
download | scala-38c668fcc7df015f57cb7891154e261cd0a1fd76.tar.gz scala-38c668fcc7df015f57cb7891154e261cd0a1fd76.tar.bz2 scala-38c668fcc7df015f57cb7891154e261cd0a1fd76.zip |
Test case closes #2070. No review.
Diffstat (limited to 'test/files/neg')
-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[_]] + } +} |