Skip to content

Commit 4ff194e

Browse files
committed
Fix #1799: Make compilation of FunctionN traits possible.
1 parent 653698e commit 4ff194e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,7 @@ class Definitions {
834834
val newDecls = new MutableScope(oldDecls) {
835835
override def lookupEntry(name: Name)(implicit ctx: Context): ScopeEntry = {
836836
val res = super.lookupEntry(name)
837-
if (res == null && name.functionArity > 0)
837+
if (res == null && name.functionArity > MaxImplementedFunctionArity)
838838
newScopeEntry(newFunctionNTrait(name.functionArity))
839839
else res
840840
}

0 commit comments

Comments
 (0)