diff options
author | Guillaume Martres <smarter@ubuntu.com> | 2017-02-05 13:28:11 +0100 |
---|---|---|
committer | Guillaume Martres <smarter@ubuntu.com> | 2017-02-05 17:50:09 +0100 |
commit | b0576e977c26a86a400755ab9810b90af73b3b8d (patch) | |
tree | 1b0557b13cd7bd398d0ff385283bcb575cbc2fd7 /tests/pos/unapply.scala | |
parent | ac868319ecf75bcffe6000a41379c5c12e92e62e (diff) | |
download | dotty-b0576e977c26a86a400755ab9810b90af73b3b8d.tar.gz dotty-b0576e977c26a86a400755ab9810b90af73b3b8d.tar.bz2 dotty-b0576e977c26a86a400755ab9810b90af73b3b8d.zip |
Better positions for infix term operations.
Preserving the position of infix operators is useful for IDEs'
type-at-point. We also preserve the position of the untyped lhs of
right-associative operators, this is useful both for IDEs and for error
messages, before:
4 |val x: List[Int] = "foo" :: List(1)
| ^
| found: String($1$)
| required: Int
|
After:
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
|
Note: It would be even nicer if we displayed "String" instead of
"String($1$)" since $1$ is synthetic, this commit does not address this.
Diffstat (limited to 'tests/pos/unapply.scala')
0 files changed, 0 insertions, 0 deletions