diff options
Diffstat (limited to 'src/compiler')
4 files changed, 15 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index 1cd7842fd4..f03b7d5096 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -386,9 +386,10 @@ abstract class UnCurry extends InfoTransform with TypingTransformers { localTyper.typedPos(pos) { val predef = gen.mkAttributedRef(PredefModule) val meth = - if ((elemtp <:< AnyRefClass.tpe) && !isPhantomClass(elemtp.typeSymbol) || - isValueClass(elemtp.typeSymbol)) - Select(predef, "wrapArray") + if ((elemtp <:< AnyRefClass.tpe) && !isPhantomClass(elemtp.typeSymbol)) + Select(predef, "wrapRefArray") + else if (isValueClass(elemtp.typeSymbol)) + Select(predef, "wrap"+elemtp.typeSymbol.name+"Array") else TypeApply(Select(predef, "genericWrapArray"), List(TypeTree(elemtp))) Apply(meth, List(tree)) diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index a6e6aedea6..90af1e479b 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -310,10 +310,11 @@ self: Analyzer => try { val itree1 = if (isView) - typed1( + typed1 ( atPos(itree.pos) ( Apply(itree, List(Ident("<argument>").setType(approximate(pt.typeArgs.head))))), - EXPRmode, approximate(pt.typeArgs.tail.head)) + EXPRmode, approximate(pt.typeArgs.tail.head) + ) else typed1(itree, EXPRmode, wildPt) diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala index f7829208b1..737af2d36e 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala @@ -166,7 +166,7 @@ trait Infer { // this can happen if during solving a cyclic type paramater // such as T <: T gets completed. See #360 tvar.constr.inst = ErrorType - } else assert(false, tvar.origin) + } else assert(false, tvar.origin+" at "+tvar.origin.typeSymbol.owner) tvars map instantiate } diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 90e263587c..1943fcc1a4 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -237,7 +237,14 @@ trait Typers { self: Analyzer => else to.typeSymbol.newValue(tree.pos, name) psym = to.decls enter psym psym setInfo tp + try { inferView(tree, from, to, true) + } catch { + case ex: AssertionError => + println("infer view "+tree+" "+name+" "+context.undetparams) + throw ex + } + } import infer._ |