diff options
Diffstat (limited to 'src/dotty/tools')
-rw-r--r-- | src/dotty/tools/dotc/ast/Desugar.scala | 6 |
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 } |