From 7d793f6ff59152a24ce4b22291c49dc1c4c01798 Mon Sep 17 00:00:00 2001 From: Burak Emir Date: Tue, 14 Aug 2007 18:41:08 +0000 Subject: reverted typer change, no feature #1196 --- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 0ba003908c..4fe2159a34 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1687,11 +1687,23 @@ trait Typers { self: Analyzer => if (!isFullyDefined(pt)) assert(false, tree+" ==> "+UnApply(fun1, args1)+", pt = "+pt) // // this would be a better choice (from #1196), but fails due to (broken?) refinements - val itype = refinedType(List(pt, arg.tpe), context.owner) + // val itype = refinedType(List(pt, arg.tpe), context.owner) // // restore old type (arg is a dummy tree, just needs to pass typechecking) arg.tpe = oldArgType - UnApply(fun1, args1) setPos tree.pos setType itype //pt + UnApply(fun1, args1) setPos tree.pos setType pt //itype //pt + // + // if you use the better itype, then the following happens. + // the required type looks wrong... + // + ///files/pos/bug0646.scala [FAILED] + // + //failed with type mismatch; + // found : scala.xml.NodeSeq{ ... } + // required: scala.xml.NodeSeq{ ... } with scala.xml.NodeSeq{ ... } with scala.xml.Node on: temp3._data().==("Blabla").&&({ + // exit(temp0); + // true + //}) } else { errorTree(tree, "wrong number of arguments for "+treeSymTypeMsg(fun)) } -- cgit v1.2.3