diff options
Diffstat (limited to 'test/files/neg')
-rw-r--r-- | test/files/neg/t6567.check | 7 | ||||
-rw-r--r-- | test/files/neg/t6567.flags | 1 | ||||
-rw-r--r-- | test/files/neg/t6567.scala | 11 |
3 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/t6567.check b/test/files/neg/t6567.check new file mode 100644 index 0000000000..4c513e64cd --- /dev/null +++ b/test/files/neg/t6567.check @@ -0,0 +1,7 @@ +t6567.scala:8: error: Suspicious application of an implicit view (Test.this.a2b) in the argument to Option.apply. + Option[B](a) + ^ +t6567.scala:10: error: Suspicious application of an implicit view (Test.this.a2b) in the argument to Option.apply. + val b: Option[B] = Option(a) + ^ +two errors found diff --git a/test/files/neg/t6567.flags b/test/files/neg/t6567.flags new file mode 100644 index 0000000000..e93641e931 --- /dev/null +++ b/test/files/neg/t6567.flags @@ -0,0 +1 @@ +-Xlint -Xfatal-warnings
\ No newline at end of file diff --git a/test/files/neg/t6567.scala b/test/files/neg/t6567.scala new file mode 100644 index 0000000000..650e5e39ae --- /dev/null +++ b/test/files/neg/t6567.scala @@ -0,0 +1,11 @@ +class A +class B + +object Test { + val a: A = null + implicit def a2b(a: A) = new B + + Option[B](a) + + val b: Option[B] = Option(a) +} |