summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-06 08:44:28 +0000
committerPaul Phillips <paulp@improving.org>2011-01-06 08:44:28 +0000
commit0b5c9ca6535b38dbfc958d92cfce691aa6de205f (patch)
tree62a33b75a98c1eb594696ae46fa3c50d2a006107 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentc875dc635b82bd7541918cb4248cc79d818d4fc8 (diff)
downloadscala-0b5c9ca6535b38dbfc958d92cfce691aa6de205f.tar.gz
scala-0b5c9ca6535b38dbfc958d92cfce691aa6de205f.tar.bz2
scala-0b5c9ca6535b38dbfc958d92cfce691aa6de205f.zip
I took the following comments at their word:
// Cannot be created directly; one should always use `singleType' // for creation. Cannot be created directly; one should always use // `refinedType' for creation. Cannot be created directly; one should // always use `typeRef' for creation. (@M: Otherwise hashing breaks) This involved altering about 15 locations. If there was a rhyme or a reason as to why those particular places were entitled to ignore the "always" dictate, I trust it will emerge from some corner now. Until then, it's nice to see some code following its official marching orders. Review by odersky.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 252d089ab8..7ef219bb23 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -3145,7 +3145,7 @@ trait Typers extends Modes {
}
def typedEta(expr1: Tree): Tree = expr1.tpe match {
- case TypeRef(_, sym, _) if (sym == ByNameParamClass) =>
+ case TypeRef(_, ByNameParamClass, _) =>
val expr2 = Function(List(), expr1) setPos expr1.pos
new ChangeOwnerTraverser(context.owner, expr2.symbol).traverse(expr2)
typed1(expr2, mode, pt)