aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/backquoted_type_operator.scala
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2017-02-05 12:47:05 +0100
committerGuillaume Martres <smarter@ubuntu.com>2017-02-05 17:50:05 +0100
commitac868319ecf75bcffe6000a41379c5c12e92e62e (patch)
tree4fcef8e1a93bde01abb8fe4ccc4c7e44e28f60f4 /tests/pos/backquoted_type_operator.scala
parentda7d7231b7f21fe1085abc569eb783590074a359 (diff)
downloaddotty-ac868319ecf75bcffe6000a41379c5c12e92e62e.tar.gz
dotty-ac868319ecf75bcffe6000a41379c5c12e92e62e.tar.bz2
dotty-ac868319ecf75bcffe6000a41379c5c12e92e62e.zip
Represent untyped operators as Ident instead of Name
This has two advantages: - We can distinguish BackquotedIdent from Ident, allowing the user to use a defined "type `&`", see testcase. - We get better positions for the operators. This is useful in IDEs, for example to get the type at point.
Diffstat (limited to 'tests/pos/backquoted_type_operator.scala')
-rw-r--r--tests/pos/backquoted_type_operator.scala4
1 files changed, 4 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
+}