diff options
author | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-06-03 17:51:01 +0200 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@typesafe.com> | 2016-06-03 17:51:01 +0200 |
commit | af93c7a147156f69cad78cc80a36aeaeb89cbe0c (patch) | |
tree | 750bfee2d0dffd3a3cb29ab59ab2eb5f7da8e319 /test | |
parent | ae03df947043f0b9a93017ca5a0018b7350fdabb (diff) | |
parent | 5667ff46c134878e35edca1ff57b8007ebec4f9a (diff) | |
download | scala-af93c7a147156f69cad78cc80a36aeaeb89cbe0c.tar.gz scala-af93c7a147156f69cad78cc80a36aeaeb89cbe0c.tar.bz2 scala-af93c7a147156f69cad78cc80a36aeaeb89cbe0c.zip |
Merge pull request #5209 from adriaanm/trait-no-native-meth
Prohibit @native method in trait
Diffstat (limited to 'test')
-rw-r--r-- | test/files/neg/trait-no-native.check | 4 | ||||
-rw-r--r-- | test/files/neg/trait-no-native.scala | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/files/neg/trait-no-native.check b/test/files/neg/trait-no-native.check new file mode 100644 index 0000000000..12bce4042d --- /dev/null +++ b/test/files/neg/trait-no-native.check @@ -0,0 +1,4 @@ +trait-no-native.scala:3: error: A trait cannot define a native method. + @native def foo = ??? + ^ +one error found diff --git a/test/files/neg/trait-no-native.scala b/test/files/neg/trait-no-native.scala new file mode 100644 index 0000000000..463e604a48 --- /dev/null +++ b/test/files/neg/trait-no-native.scala @@ -0,0 +1,4 @@ +trait T { + // should not compile, because it would result in a VerifyError + @native def foo = ??? +} |