Skip to content

Commit 2690241

Browse files
committed
address review comments
1 parent 871a87e commit 2690241

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -920,7 +920,8 @@ object desugar {
920920
assert(arity <= Definitions.MaxTupleArity)
921921
def tupleTypeRef = defn.TupleType(arity)
922922
if (arity == 1) ts.head
923-
else if (arity == 0) unitLiteral
923+
else if (arity == 0)
924+
if (ctx.mode is Mode.Type) TypeTree(defn.UnitType) else unitLiteral
924925
else if (ctx.mode is Mode.Type) AppliedTypeTree(ref(tupleTypeRef), ts)
925926
else Apply(ref(tupleTypeRef.classSymbol.companionModule.termRef), ts)
926927
}

0 commit comments

Comments
 (0)