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 7b9ffbb commit 871a87eCopy full SHA for 871a87e
compiler/src/dotty/tools/dotc/ast/Desugar.scala
@@ -920,8 +920,8 @@ object desugar {
920
assert(arity <= Definitions.MaxTupleArity)
921
def tupleTypeRef = defn.TupleType(arity)
922
if (arity == 1) ts.head
923
- else if (ctx.mode is Mode.Type) AppliedTypeTree(ref(tupleTypeRef), ts)
924
else if (arity == 0) unitLiteral
+ else if (ctx.mode is Mode.Type) AppliedTypeTree(ref(tupleTypeRef), ts)
925
else Apply(ref(tupleTypeRef.classSymbol.companionModule.termRef), ts)
926
}
927
tests/neg/i5640.scala
@@ -0,0 +1,3 @@
1
+object test {
2
+ val foo = (()) => () // error: not a legal formal parameter
3
+}
0 commit comments