aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2016-11-24 18:13:19 +0100
committerGitHub <noreply@github.com>2016-11-24 18:13:19 +0100
commit566e8f7d193c855ac78cedfb3723192cb04acb65 (patch)
tree6c13dfa6eb4110c0619fd7d5ae8df639e8ed69f2 /tests
parentb26af1b24bb1a938627709d0e8c6932fe902d7b4 (diff)
parent3d20226ab4c5e4425edc30901a9746d4bb46e105 (diff)
downloaddotty-566e8f7d193c855ac78cedfb3723192cb04acb65.tar.gz
dotty-566e8f7d193c855ac78cedfb3723192cb04acb65.tar.bz2
dotty-566e8f7d193c855ac78cedfb3723192cb04acb65.zip
Merge pull request #1719 from dotty-staging/fix-#1705
Fix #1707: Survive non-existing positions in parser
Diffstat (limited to 'tests')
-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)
+}