diff options
author | Martin Odersky <odersky@gmail.com> | 2016-12-17 18:59:33 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2016-12-17 18:59:33 +0100 |
commit | 0742ba8e91b098b10529972bf5b630c98a5a882b (patch) | |
tree | 71f06c1ec815f505c2309fc7d4affd5ed1a693ab /compiler | |
parent | c18d2286e4d21b4a4e7b67ded9c075c8dbb4cda5 (diff) | |
download | dotty-0742ba8e91b098b10529972bf5b630c98a5a882b.tar.gz dotty-0742ba8e91b098b10529972bf5b630c98a5a882b.tar.bz2 dotty-0742ba8e91b098b10529972bf5b630c98a5a882b.zip |
Fix rebase breakage
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/src/dotty/tools/dotc/core/Definitions.scala | 6 |
1 files changed, 5 insertions, 1 deletions
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 } |