From ac868319ecf75bcffe6000a41379c5c12e92e62e Mon Sep 17 00:00:00 2001 From: Guillaume Martres Date: Sun, 5 Feb 2017 12:47:05 +0100 Subject: 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. --- tests/pos/backquoted_type_operator.scala | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 tests/pos/backquoted_type_operator.scala (limited to 'tests') 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 +} -- cgit v1.2.3