diff options
author | Martin Odersky <odersky@gmail.com> | 2013-12-09 18:29:51 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-12-09 18:29:51 +0100 |
commit | eb0813b9ef437b9c89f8b67ae5b0070b300a0fc1 (patch) | |
tree | a95eb0b9b2e37a1c4efbf6a665a85c9fba451f25 /src/dotty/tools/dotc/typer/Applications.scala | |
parent | 42b169a85dacb6a5f1aff9b06bd69065d5f539f2 (diff) | |
download | dotty-eb0813b9ef437b9c89f8b67ae5b0070b300a0fc1.tar.gz dotty-eb0813b9ef437b9c89f8b67ae5b0070b300a0fc1.tar.bz2 dotty-eb0813b9ef437b9c89f8b67ae5b0070b300a0fc1.zip |
Fixes to avoid stale symbols and to avoid methods as pattern constructors.
Diffstat (limited to 'src/dotty/tools/dotc/typer/Applications.scala')
-rw-r--r-- | src/dotty/tools/dotc/typer/Applications.scala | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/dotty/tools/dotc/typer/Applications.scala b/src/dotty/tools/dotc/typer/Applications.scala index 5e56d9eb8..64f44ee5e 100644 --- a/src/dotty/tools/dotc/typer/Applications.scala +++ b/src/dotty/tools/dotc/typer/Applications.scala @@ -19,7 +19,6 @@ import ErrorReporting._ import Trees._ import Names._ import StdNames._ -import Constants._ import Inferencing._ import EtaExpansion._ import collection.mutable @@ -538,8 +537,7 @@ trait Applications extends Compatibility { self: Typer => errorTree(tree, s"${qual.show} cannot be used as an extractor in a pattern because it lacks an unapply or unapplySeq method") val unapply = { - val dummyArg = untpd.TypedSplice(dummyTreeOfType(WildcardType)) - val unappProto = FunProto(dummyArg :: Nil, WildcardType, this) + val unappProto = new UnapplyFunProto(this) tryEither { implicit ctx => typedExpr(untpd.Select(qual, nme.unapply), unappProto) } { @@ -755,9 +753,6 @@ trait Applications extends Compatibility { self: Typer => } } - private lazy val dummyTree = untpd.Literal(Constant(null)) - def dummyTreeOfType(tp: Type): Tree = dummyTree withTypeUnchecked tp - /** Resolve overloaded alternative `alts`, given expected type `pt`. * todo: use techniques like for implicits to pick candidates quickly? */ |