diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-01-26 07:33:37 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2011-01-26 07:33:37 +0000 |
commit | f9b1917e8be7a178282514429f494a3905055aab (patch) | |
tree | 24e3c16b3293367c6ff2a3daca382158ba53adf5 /test/files/neg | |
parent | ec9b00e1955fb24038542c5ba67ba8483efb5b50 (diff) | |
download | scala-f9b1917e8be7a178282514429f494a3905055aab.tar.gz scala-f9b1917e8be7a178282514429f494a3905055aab.tar.bz2 scala-f9b1917e8be7a178282514429f494a3905055aab.zip |
closes #4137.
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t4137.check | 9 | ||||
-rw-r--r-- | test/files/neg/t4137.scala | 11 |
2 files changed, 20 insertions, 0 deletions
diff --git a/test/files/neg/t4137.check b/test/files/neg/t4137.check new file mode 100644 index 0000000000..9767bdb1ce --- /dev/null +++ b/test/files/neg/t4137.check @@ -0,0 +1,9 @@ +t4137.scala:9: error: overriding type EPC in trait A, which equals [X1]C[X1]; + type EPC has incompatible type + override type EPC = C[T] + ^ +t4137.scala:10: error: overriding type EPC2 in trait A, which equals [X1]C[X1]; + type EPC2 has incompatible type + override type EPC2[X1 <: String] = C[X1] + ^ +two errors found diff --git a/test/files/neg/t4137.scala b/test/files/neg/t4137.scala new file mode 100644 index 0000000000..68f249fdeb --- /dev/null +++ b/test/files/neg/t4137.scala @@ -0,0 +1,11 @@ +trait C[T] + +trait A[T] { + type EPC[X1] = C[X1] + type EPC2[X1] = C[X1] +} + +trait B[T] extends A[T] { + override type EPC = C[T] + override type EPC2[X1 <: String] = C[X1] +}
\ No newline at end of file |