Skip to content

Commit 0742ba8

Browse files
committed
Fix rebase breakage
1 parent c18d228 commit 0742ba8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -865,6 +865,9 @@ class Definitions {
865865

866866
// ----- Initialization ---------------------------------------------------
867867

868+
private def maxImplemented(name: Name) =
869+
if (name `startsWith` tpnme.Function) MaxImplementedFunctionArity else 0
870+
868871
/** Give the scala package a scope where a FunctionN trait is automatically
869872
* added when someone looks for it.
870873
*/
@@ -874,7 +877,8 @@ class Definitions {
874877
val newDecls = new MutableScope(oldDecls) {
875878
override def lookupEntry(name: Name)(implicit ctx: Context): ScopeEntry = {
876879
val res = super.lookupEntry(name)
877-
if (res == null && name.isTypeName && name.functionArity > MaxImplementedFunctionArity)
880+
if (res == null && name.isTypeName &&
881+
name.functionArity > maxImplemented(name))
878882
newScopeEntry(newFunctionNTrait(name.asTypeName))
879883
else res
880884
}

0 commit comments

Comments
 (0)