aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2017-02-08 22:17:09 +1100
committerGitHub <noreply@github.com>2017-02-08 22:17:09 +1100
commit99679cffc0a5d20e7e7f3c090eb310a6134eeee7 (patch)
treea62c232c33a23e525687743f31a31a295014dd7d /tests
parentde2c4477d2b9dfc0393b4acba5525fa9714835b9 (diff)
parentb0576e977c26a86a400755ab9810b90af73b3b8d (diff)
downloaddotty-99679cffc0a5d20e7e7f3c090eb310a6134eeee7.tar.gz
dotty-99679cffc0a5d20e7e7f3c090eb310a6134eeee7.tar.bz2
dotty-99679cffc0a5d20e7e7f3c090eb310a6134eeee7.zip
Merge pull request #1941 from dotty-staging/fix/infix-pos
Better positions for infix operations
Diffstat (limited to 'tests')
-rw-r--r--tests/pos/backquoted_type_operator.scala4
-rw-r--r--tests/repl/errmsgs.check7
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/pos/backquoted_type_operator.scala b/tests/pos/backquoted_type_operator.scala
new file mode 100644
index 000000000..5ee875702
--- /dev/null
+++ b/tests/pos/backquoted_type_operator.scala
@@ -0,0 +1,4 @@
+object Test {
+ type `&`[L,R] = L
+ val x: Int `&` String = 10
+}
diff --git a/tests/repl/errmsgs.check b/tests/repl/errmsgs.check
index f0ccdf53f..0dc8e8ae5 100644
--- a/tests/repl/errmsgs.check
+++ b/tests/repl/errmsgs.check
@@ -78,4 +78,11 @@ scala> class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
4 |class Foo() { def bar: Int = 1 }; val foo = new Foo(); foo.barr
| ^^^^^^^^
| value `barr` is not a member of Foo(foo) - did you mean `foo.bar`?
+scala> val x: List[Int] = "foo" :: List(1)
+-- [E007] Type Mismatch Error: <console> ---------------------------------------
+4 |val x: List[Int] = "foo" :: List(1)
+ | ^^^^^
+ | found: String($1$)
+ | required: Int
+ |
scala> :quit