diff options
author | Martin Odersky <odersky@gmail.com> | 2013-11-28 14:24:11 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-11-28 14:41:21 +0100 |
commit | 76f07f7a5e03ac685270c7af4aa736ca84a00f1f (patch) | |
tree | 7f59a4ed0d26792070c3d0b1e9c3f257e4b023e3 /src/dotty/tools/dotc/core/TypeApplications.scala | |
parent | c39c2af036e9e69fc339b805a0869126efadae0f (diff) | |
download | dotty-76f07f7a5e03ac685270c7af4aa736ca84a00f1f.tar.gz dotty-76f07f7a5e03ac685270c7af4aa736ca84a00f1f.tar.bz2 dotty-76f07f7a5e03ac685270c7af4aa736ca84a00f1f.zip |
Hoisting out commonly used values into util.common
... because this cuts down on object creations. Also, some polishings in Denotations.
Diffstat (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/TypeApplications.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/TypeApplications.scala b/src/dotty/tools/dotc/core/TypeApplications.scala index 66b21eb5e..fd661aab1 100644 --- a/src/dotty/tools/dotc/core/TypeApplications.scala +++ b/src/dotty/tools/dotc/core/TypeApplications.scala @@ -6,6 +6,7 @@ import Contexts._ import Symbols._ import Decorators._ import util.Stats._ +import util.common._ import Names._ import Flags._ import util.Positions.Position @@ -102,7 +103,7 @@ class TypeApplications(val self: Type) extends AnyVal { if (tsym.isClass || !self.typeSymbol.isCompleting) typeParams else { ctx.warning("encountered F-bounded higher-kinded type parameters; assuming they are invariant") - defn.hkTrait(args map Function.const(0)).typeParams + defn.hkTrait(args map alwaysZero).typeParams } if (args.isEmpty) self |