diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-09-29 17:10:45 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-10-10 13:25:36 +0200 |
commit | f23ff3abba8663a0e7f64f79b556efd36cc86a83 (patch) | |
tree | d025c7362cd14bae1ac54b02d399554e3b91c12c /tests/neg | |
parent | 0781b31fa4e3d22cb6a51882b8d632ea9a16ed6f (diff) | |
download | dotty-f23ff3abba8663a0e7f64f79b556efd36cc86a83.tar.gz dotty-f23ff3abba8663a0e7f64f79b556efd36cc86a83.tar.bz2 dotty-f23ff3abba8663a0e7f64f79b556efd36cc86a83.zip |
Improve positions for MemberDefs using `namePos`
Diffstat (limited to 'tests/neg')
-rw-r--r-- | tests/neg/applydynamic_sip.scala | 6 | ||||
-rw-r--r-- | tests/neg/assignments.scala | 2 | ||||
-rw-r--r-- | tests/neg/dynamicApplyDynamicTest3.scala | 2 | ||||
-rw-r--r-- | tests/neg/i1424.scala | 2 | ||||
-rw-r--r-- | tests/neg/tailcall/t6574.scala | 2 |
5 files changed, 7 insertions, 7 deletions
diff --git a/tests/neg/applydynamic_sip.scala b/tests/neg/applydynamic_sip.scala index 7b131e7ff..86cff5fc4 100644 --- a/tests/neg/applydynamic_sip.scala +++ b/tests/neg/applydynamic_sip.scala @@ -18,9 +18,9 @@ object Test extends App { } val bad1 = new Bad1 bad1.sel // error - bad1.sel(1) // error // error - bad1.sel(a = 1) // error // error - bad1.sel = 1 // error // error + bad1.sel(1) // error + bad1.sel(a = 1) // error + bad1.sel = 1 // error class Bad2 extends Dynamic { def selectDynamic = 1 diff --git a/tests/neg/assignments.scala b/tests/neg/assignments.scala index 5be107717..273419cb5 100644 --- a/tests/neg/assignments.scala +++ b/tests/neg/assignments.scala @@ -13,7 +13,7 @@ object assignments { x = x + 1 x *= 2 - x_= = 2 // error should give missing arguments + // error reassignment to val + x_= = 2 // error should give missing arguments } var c = new C diff --git a/tests/neg/dynamicApplyDynamicTest3.scala b/tests/neg/dynamicApplyDynamicTest3.scala index 61d3c9677..d68132b02 100644 --- a/tests/neg/dynamicApplyDynamicTest3.scala +++ b/tests/neg/dynamicApplyDynamicTest3.scala @@ -3,5 +3,5 @@ import scala.language.dynamics class Foo extends scala.Dynamic object DynamicTest { - new Foo().bazApply _ // error // error + new Foo().bazApply _ // error } diff --git a/tests/neg/i1424.scala b/tests/neg/i1424.scala index 3586260c1..8eba32842 100644 --- a/tests/neg/i1424.scala +++ b/tests/neg/i1424.scala @@ -1,3 +1,3 @@ class Test { - (x: Int) => x // error: not a legal self type clause // error: package x is not a value // error: package x is not a value + (x: Int) => x // error: not a legal self type clause // error: not found x } diff --git a/tests/neg/tailcall/t6574.scala b/tests/neg/tailcall/t6574.scala index d9ba2882d..462ef800f 100644 --- a/tests/neg/tailcall/t6574.scala +++ b/tests/neg/tailcall/t6574.scala @@ -4,7 +4,7 @@ class Bad[X, Y](val v: Int) extends AnyVal { println("tail") } - @annotation.tailrec final def differentTypeArgs : Unit = { // error + @annotation.tailrec final def differentTypeArgs: Unit = { // error {(); new Bad[String, Unit](0)}.differentTypeArgs // error } } |