diff options
author | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-04-25 19:56:28 +0000 |
---|---|---|
committer | Adriaan Moors <adriaan.moors@epfl.ch> | 2007-04-25 19:56:28 +0000 |
commit | 789bf97c720a6c1ed31492ab400d3f3ec5f4ee43 (patch) | |
tree | e1db2c0fc7bf0c9c8755fcde75a345703559b79f | |
parent | 04034834f5ae9c68e1e42d8aef151a2ef7f83fdf (diff) | |
download | scala-789bf97c720a6c1ed31492ab400d3f3ec5f4ee43.tar.gz scala-789bf97c720a6c1ed31492ab400d3f3ec5f4ee43.tar.bz2 scala-789bf97c720a6c1ed31492ab400d3f3ec5f4ee43.zip |
added missing .info to a symbol.typeParams..
oops!
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 | ||||
-rw-r--r-- | test/files/pos/tcpoly_typeapp.scala | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index ae53628530..4fbaac7e22 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1902,7 +1902,7 @@ trait Typers requires Analyzer { def typedTypeApply(fun: Tree, args: List[Tree]): Tree = fun.tpe match { case OverloadedType(pre, alts) => inferPolyAlternatives(fun, args map (.tpe)) - val tparams = fun.symbol.typeParams + val tparams = fun.symbol.typeParams //@M TODO: fun.symbol.info.typeParams ? (as in typedAppliedTypeTree) assert(args.length == tparams.length) //@M: in case TypeApply we can't check the kind-arities // of the type arguments as we don't know which alternative to choose... here we do val args1 = map2Conserve(args, tparams) { @@ -2344,7 +2344,7 @@ trait Typers requires Analyzer { def typedAppliedTypeTree(tpt: Tree, args: List[Tree]) = { val tpt1 = typed1(tpt, mode | FUNmode | TAPPmode, WildcardType) - val tparams = tpt1.symbol.typeParams + val tparams = tpt1.symbol.info.typeParams // must be .info.typeParams (see pos/tcpoly_typeapp.scala) if (tpt1.tpe.isError) { setError(tree) diff --git a/test/files/pos/tcpoly_typeapp.scala b/test/files/pos/tcpoly_typeapp.scala new file mode 100644 index 0000000000..7fb4dca72e --- /dev/null +++ b/test/files/pos/tcpoly_typeapp.scala @@ -0,0 +1,4 @@ +abstract class x { + type t[m[x] <: Bound[x], Bound[x]] + val x: t[scala.collection.mutable.MutableList, Iterable] +}
\ No newline at end of file |