From 495b07ea1509a1bf3a7091f9fc0a95fccf1b183e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 15 Jun 2015 17:31:02 +0200 Subject: Fix #651 Generalize criterion for isOpAssign Methods like + can have multiple parameters. In that case += also takes multiple parameters. --- src/dotty/tools/dotc/ast/TreeInfo.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/ast/TreeInfo.scala') diff --git a/src/dotty/tools/dotc/ast/TreeInfo.scala b/src/dotty/tools/dotc/ast/TreeInfo.scala index 2f6b6b914..6401c01c1 100644 --- a/src/dotty/tools/dotc/ast/TreeInfo.scala +++ b/src/dotty/tools/dotc/ast/TreeInfo.scala @@ -33,7 +33,7 @@ trait TreeInfo[T >: Untyped <: Type] { self: Trees.Instance[T] => } def isOpAssign(tree: Tree) = unsplice(tree) match { - case Apply(fn, _ :: Nil) => + case Apply(fn, _ :: _) => unsplice(fn) match { case Select(_, name) if name.isOpAssignmentName => true case _ => false -- cgit v1.2.3