diff options
author | Martin Odersky <odersky@gmail.com> | 2008-05-21 18:00:03 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-05-21 18:00:03 +0000 |
commit | e327bbb7bf463195c7eccaa2a399f283a849fdab (patch) | |
tree | 67b9a3cdd8a6b9c59a4ae709bdd54410b7bd4ac1 /src/compiler | |
parent | 96b80791737efd952383aba56ba69440e861647d (diff) | |
download | scala-e327bbb7bf463195c7eccaa2a399f283a849fdab.tar.gz scala-e327bbb7bf463195c7eccaa2a399f283a849fdab.tar.bz2 scala-e327bbb7bf463195c7eccaa2a399f283a849fdab.zip |
correction to meaning of operator names: names ...
correction to meaning of operator names: names starting with = always never count as
assignment operators. Fixed #905
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/StdNames.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/StdNames.scala b/src/compiler/scala/tools/nsc/symtab/StdNames.scala index 7ddc641f6f..16eb6dd01b 100644 --- a/src/compiler/scala/tools/nsc/symtab/StdNames.scala +++ b/src/compiler/scala/tools/nsc/symtab/StdNames.scala @@ -99,7 +99,7 @@ trait StdNames { def isOpAssignmentName(name: Name) = name(name.length - 1) == '=' && isOperatorCharacter(name(0)) && - name != EQraw && name != NEraw && name != LEraw && name != GEraw + name(0) != '=' && name != NEraw && name != LEraw && name != GEraw def isOperatorCharacter(c: Char) = c match { case '~' | '!' | '@' | '#' | '%' | diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 71a6ceeb34..ce461952e1 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3482,7 +3482,10 @@ trait Typers { self: Analyzer => } try { // if (!isLocal) tree setSymbol info.sym - val isView = (pt0 ne pt) + val isView = pt0 match { + case MethodType(_, _) | PolyType(_, _) => true + case _ => false + } val tree1 = if (isView) typed1(Apply(tree, List(Ident("<argument>") setType pt0.paramTypes.head)), EXPRmode, pt0.resultType) |