diff options
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 |