summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/compiler/scala/tools/nsc/symtab/StdNames.scala2
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala5
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)