From 76f07f7a5e03ac685270c7af4aa736ca84a00f1f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 28 Nov 2013 14:24:11 +0100 Subject: Hoisting out commonly used values into util.common ... because this cuts down on object creations. Also, some polishings in Denotations. --- src/dotty/tools/dotc/core/TypeApplications.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/dotty/tools/dotc/core/TypeApplications.scala') 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 -- cgit v1.2.3