aboutsummaryrefslogtreecommitdiff
path: root/tests/neg/i1707.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-11-24 16:45:26 +0100
committerMartin Odersky <odersky@gmail.com>2016-11-24 16:45:26 +0100
commit3d20226ab4c5e4425edc30901a9746d4bb46e105 (patch)
tree6bfa096271449e729526901e5f7caec60515b5f4 /tests/neg/i1707.scala
parent18eea6b3159e8caaffc1e415ce69301b64d566d4 (diff)
downloaddotty-3d20226ab4c5e4425edc30901a9746d4bb46e105.tar.gz
dotty-3d20226ab4c5e4425edc30901a9746d4bb46e105.tar.bz2
dotty-3d20226ab4c5e4425edc30901a9746d4bb46e105.zip
Renamed test file to give correct issue number
Diffstat (limited to 'tests/neg/i1707.scala')
-rw-r--r--tests/neg/i1707.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/neg/i1707.scala b/tests/neg/i1707.scala
new file mode 100644
index 000000000..801adb4b7
--- /dev/null
+++ b/tests/neg/i1707.scala
@@ -0,0 +1,24 @@
+object DepBug {
+ class A {
+ class B
+ def mkB = new B
+ def m(b: B) = b
+ }
+ trait Dep {
+ val a: A
+ val b: a.B
+ }
+ val dep = new {
+ val a = new A
+ val b = a mkB
+ }
+ def useDep(d: Dep) { // error: procedure syntax
+ import d._
+ a m (b)
+ }
+ { // error: Null does not take parameters (follow on)
+ import dep._
+ a m (b)
+ }
+ dep.a m (dep b) // error (follow on)
+}