summaryrefslogtreecommitdiff
path: root/test/files/neg/infix-op-positions.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2010-09-15 23:13:53 +0000
committerPaul Phillips <paulp@improving.org>2010-09-15 23:13:53 +0000
commitb094defe6162232d8be29ae0eb44ab6742c11f9b (patch)
treeff2432ecfb17c84c3bbc1eef116510c2a5b1df64 /test/files/neg/infix-op-positions.scala
parentf78d8f648e7c5d4bd0102a03be3e6c8479146e39 (diff)
downloadscala-b094defe6162232d8be29ae0eb44ab6742c11f9b.tar.gz
scala-b094defe6162232d8be29ae0eb44ab6742c11f9b.tar.bz2
scala-b094defe6162232d8be29ae0eb44ab6742c11f9b.zip
positioning fix for infix expressions: report e...
positioning fix for infix expressions: report error at the operator instead of at the receiver of a binop In general use the operator position as the Select position's point instead of the left or right expression. Position.union always uses the receiver's point as point of the result, so swapping fixes that. See http://www.scala-lang.org/node/6912 for the report.
Diffstat (limited to 'test/files/neg/infix-op-positions.scala')
-rw-r--r--test/files/neg/infix-op-positions.scala4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/neg/infix-op-positions.scala b/test/files/neg/infix-op-positions.scala
new file mode 100644
index 0000000000..16351b0ab3
--- /dev/null
+++ b/test/files/neg/infix-op-positions.scala
@@ -0,0 +1,4 @@
+object Test {
+ Option(1) -! "test" // left associative operator
+ "test" -!: Option(1) // right associative operators
+}