aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/ast/Desugar.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-01-02 10:15:03 +0100
committerMartin Odersky <odersky@gmail.com>2014-01-02 10:15:09 +0100
commit2ecd2ddd85829faa2c724b00c8da11eb1eb8b04f (patch)
treefe075048f9949c34459f337fd12622ab5d333cd1 /src/dotty/tools/dotc/ast/Desugar.scala
parent72e1e896d369a3872c49c26544d53f6e04436217 (diff)
downloaddotty-2ecd2ddd85829faa2c724b00c8da11eb1eb8b04f.tar.gz
dotty-2ecd2ddd85829faa2c724b00c8da11eb1eb8b04f.tar.bz2
dotty-2ecd2ddd85829faa2c724b00c8da11eb1eb8b04f.zip
Making Desugar.scala dotty-conform.
Diffstat (limited to 'src/dotty/tools/dotc/ast/Desugar.scala')
-rw-r--r--src/dotty/tools/dotc/ast/Desugar.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/dotty/tools/dotc/ast/Desugar.scala b/src/dotty/tools/dotc/ast/Desugar.scala
index be87776eb..54ea96eed 100644
--- a/src/dotty/tools/dotc/ast/Desugar.scala
+++ b/src/dotty/tools/dotc/ast/Desugar.scala
@@ -180,7 +180,9 @@ object desugar {
constr1.mods, constr1.name, tparams, vparamss, constr1.tpt, constr1.rhs)
// a reference to the class type, with all parameters given.
- val classTypeRef = {
+ val classTypeRef: Tree = {
+ // Dotty deviation: Without type annotation infers Ident | AppliedTypeTree, which
+ // renders the :\ in companions below untypable.
val tycon = Ident(cdef.name) withPos cdef.pos.startPos
val tparams = impl.constr.tparams
if (tparams.isEmpty) tycon else AppliedTypeTree(tycon, tparams map refOfDef)
@@ -728,7 +730,7 @@ object desugar {
*/
private object VarPattern {
def unapply(tree: Tree)(implicit ctx: Context): Option[VarInfo] = tree match {
- case id: Ident => Some(id, TypeTree())
+ case id: Ident => Some((id, TypeTree())) // Dotty deviation: No auto-tupling
case Typed(id: Ident, tpt) => Some((id, tpt))
case _ => None
}