File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -865,6 +865,9 @@ class Definitions {
865
865
866
866
// ----- Initialization ---------------------------------------------------
867
867
868
+ private def maxImplemented (name : Name ) =
869
+ if (name `startsWith` tpnme.Function ) MaxImplementedFunctionArity else 0
870
+
868
871
/** Give the scala package a scope where a FunctionN trait is automatically
869
872
* added when someone looks for it.
870
873
*/
@@ -874,7 +877,8 @@ class Definitions {
874
877
val newDecls = new MutableScope (oldDecls) {
875
878
override def lookupEntry (name : Name )(implicit ctx : Context ): ScopeEntry = {
876
879
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))
878
882
newScopeEntry(newFunctionNTrait(name.asTypeName))
879
883
else res
880
884
}
You can’t perform that action at this time.
0 commit comments