diff options
author | mihaylov <mihaylov@epfl.ch> | 2007-07-20 19:29:05 +0000 |
---|---|---|
committer | mihaylov <mihaylov@epfl.ch> | 2007-07-20 19:29:05 +0000 |
commit | b37372ea5cac3308e2cc63953e685e04eac5e1a2 (patch) | |
tree | 30c59990dcdda491249bf4374874adb9f5da4164 /src/compiler/scala/tools/nsc/typechecker/Typers.scala | |
parent | c633afd891acc57662d5da29425cf7a93f8d6ea7 (diff) | |
download | scala-b37372ea5cac3308e2cc63953e685e04eac5e1a2.tar.gz scala-b37372ea5cac3308e2cc63953e685e04eac5e1a2.tar.bz2 scala-b37372ea5cac3308e2cc63953e685e04eac5e1a2.zip |
Implemented Java generics as existential types
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 5799e3f494..cc77cab65a 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1833,6 +1833,7 @@ trait Typers { self: Analyzer => val whereClauses1 = typedStats(tree.whereClauses, context.owner) val tpt1 = typedType(tree.tpt) val (typeParams, tpe) = existentialTransform(tree.whereClauses map (_.symbol), tpt1.tpe) + //println(tpe + ": " + tpe.getClass ) TypeTree(ExistentialType(typeParams, tpe)) setOriginal tree } @@ -2070,7 +2071,7 @@ trait Typers { self: Analyzer => if (fun.symbol == Predef_classOf) { if (!targs.head.typeSymbol.isClass || targs.head.typeSymbol.isRefinementClass) error(args.head.pos, "class type required"); - Literal(Constant(targs.head)) setPos tree.pos setType ClassClass.tpe + Literal(Constant(targs.head)) setPos tree.pos setType Predef_classOfType(targs.head) // @M: targs.head.normalize is not necessary --> toTypeKind eventually normalizes the type } else { val resultpe0 = restpe.instantiateTypeParams(tparams, targs) |