We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 871a87e commit 2690241Copy full SHA for 2690241
compiler/src/dotty/tools/dotc/ast/Desugar.scala
@@ -920,7 +920,8 @@ object desugar {
920
assert(arity <= Definitions.MaxTupleArity)
921
def tupleTypeRef = defn.TupleType(arity)
922
if (arity == 1) ts.head
923
- else if (arity == 0) unitLiteral
+ else if (arity == 0)
924
+ if (ctx.mode is Mode.Type) TypeTree(defn.UnitType) else unitLiteral
925
else if (ctx.mode is Mode.Type) AppliedTypeTree(ref(tupleTypeRef), ts)
926
else Apply(ref(tupleTypeRef.classSymbol.companionModule.termRef), ts)
927
}
0 commit comments