From b4f21c6da6b6bc1797908f1400631573b6445e31 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Fri, 31 Mar 2017 18:32:02 +0200 Subject: Names are no longer Seqs Drop Seq implementation of name. This implementation was always problematic because it entailed potentially very costly conversions to toSimpleName. We now have better control over when we convert a name to a simple name. --- compiler/src/dotty/tools/dotc/ast/TreeInfo.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/ast/TreeInfo.scala') diff --git a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala index 037ab73af..f3bce4000 100644 --- a/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/compiler/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -157,7 +157,7 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] => } /** Is name a left-associative operator? */ - def isLeftAssoc(operator: Name) = operator.nonEmpty && (operator.last != ':') + def isLeftAssoc(operator: Name) = !operator.isEmpty && (operator.toSimpleName.last != ':') /** can this type be a type pattern? */ def mayBeTypePat(tree: untpd.Tree): Boolean = unsplice(tree) match { -- cgit v1.2.3