summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-04-23 13:26:21 -0700
committerPaul Phillips <paulp@improving.org>2013-04-23 19:42:57 -0700
commitcf93e02b6216b96d302f3430919a921f11f0c55a (patch)
tree04353966c5626a689f4e76e089316518f50e06c1 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentfe8280c020eab60a7f94cb1faa50ba412635caea (diff)
downloadscala-cf93e02b6216b96d302f3430919a921f11f0c55a.tar.gz
scala-cf93e02b6216b96d302f3430919a921f11f0c55a.tar.bz2
scala-cf93e02b6216b96d302f3430919a921f11f0c55a.zip
Added ensureFullyDefined.
Obvious fusion of "isFullyDefined" and "makeFullyDefined".
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 60b6248a07..acc6243599 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -3403,8 +3403,7 @@ trait Typers extends Adaptations with Tags {
if (formals == null) duplErrorTree(WrongNumberOfArgsError(tree, fun))
else {
val args1 = typedArgs(args, mode, formals, formalsExpanded)
- val pt1 = if (isFullyDefined(pt)) pt else makeFullyDefined(pt) // SI-1048
-
+ val pt1 = ensureFullyDefined(pt) // SI-1048
val itype = glb(List(pt1, arg.tpe))
arg setType pt1 // restore type (arg is a dummy tree, just needs to pass typechecking)
val unapply = UnApply(fun1, args1) setPos tree.pos setType itype
@@ -5028,9 +5027,8 @@ trait Typers extends Adaptations with Tags {
if (isPatternMode) {
val uncheckedTypeExtractor = extractorForUncheckedType(tpt.pos, tptTyped.tpe)
-
// make fully defined to avoid bounded wildcard types that may be in pt from calling dropExistential (SI-2038)
- val ptDefined = if (isFullyDefined(pt)) pt else makeFullyDefined(pt)
+ val ptDefined = ensureFullyDefined(pt)
val ownType = inferTypedPattern(tptTyped, tptTyped.tpe, ptDefined, canRemedy = uncheckedTypeExtractor.nonEmpty)
treeTyped setType ownType