diff options
author | James Iry <james.iry@typesafe.com> | 2012-12-10 14:49:23 -0800 |
---|---|---|
committer | James Iry <james.iry@typesafe.com> | 2012-12-10 14:49:23 -0800 |
commit | 71e42a799aa11fda75d9d3e7b92da9f61dd1da5b (patch) | |
tree | b22fb2ad6bdf5d3a5cbb0d12e966eb4317faada3 /test | |
parent | 7fe7d2537963dd24ea1cca7b0c4b96f96b773c4a (diff) | |
download | scala-71e42a799aa11fda75d9d3e7b92da9f61dd1da5b.tar.gz scala-71e42a799aa11fda75d9d3e7b92da9f61dd1da5b.tar.bz2 scala-71e42a799aa11fda75d9d3e7b92da9f61dd1da5b.zip |
SI-6795 Adds negative check for "abstract override" on types in traits
"abstract override" shouldn't was being allowed on types in traits but the result
made no sense and the spec says that shouldn't be allowed.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/t6795.check | 4 | ||||
-rw-r--r-- | test/files/neg/t6795.scala | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t6795.check b/test/files/neg/t6795.check new file mode 100644 index 0000000000..595eda4f22 --- /dev/null +++ b/test/files/neg/t6795.check @@ -0,0 +1,4 @@ +t6795.scala:3: error: `abstract override' modifier only allowed for non-type members of traits +trait T1 extends T { abstract override type U = Int } + ^ +one error found diff --git a/test/files/neg/t6795.scala b/test/files/neg/t6795.scala new file mode 100644 index 0000000000..a93be5bc7f --- /dev/null +++ b/test/files/neg/t6795.scala @@ -0,0 +1,3 @@ +trait T { type U } +// "abstract override" shouldn't be allowed on types +trait T1 extends T { abstract override type U = Int }
\ No newline at end of file |