From 0742ba8e91b098b10529972bf5b630c98a5a882b Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sat, 17 Dec 2016 18:59:33 +0100 Subject: Fix rebase breakage --- compiler/src/dotty/tools/dotc/core/Definitions.scala | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'compiler/src/dotty/tools/dotc/core') diff --git a/compiler/src/dotty/tools/dotc/core/Definitions.scala b/compiler/src/dotty/tools/dotc/core/Definitions.scala index 814bbf48f..5162d63a8 100644 --- a/compiler/src/dotty/tools/dotc/core/Definitions.scala +++ b/compiler/src/dotty/tools/dotc/core/Definitions.scala @@ -865,6 +865,9 @@ class Definitions { // ----- Initialization --------------------------------------------------- + private def maxImplemented(name: Name) = + if (name `startsWith` tpnme.Function) MaxImplementedFunctionArity else 0 + /** Give the scala package a scope where a FunctionN trait is automatically * added when someone looks for it. */ @@ -874,7 +877,8 @@ class Definitions { val newDecls = new MutableScope(oldDecls) { override def lookupEntry(name: Name)(implicit ctx: Context): ScopeEntry = { val res = super.lookupEntry(name) - if (res == null && name.isTypeName && name.functionArity > MaxImplementedFunctionArity) + if (res == null && name.isTypeName && + name.functionArity > maxImplemented(name)) newScopeEntry(newFunctionNTrait(name.asTypeName)) else res } -- cgit v1.2.3