summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-07-03 07:21:58 +0000
committerpaltherr <paltherr@epfl.ch>2003-07-03 07:21:58 +0000
commita6389e9170fba8c9ba4227f9c029b240fff386e3 (patch)
treeeeb6424d83cdf2d7e25bee88855732fb7fc6eeca
parentd5f54192491aac2e0a22857793704fc48576a6b2 (diff)
downloadscala-a6389e9170fba8c9ba4227f9c029b240fff386e3.tar.gz
scala-a6389e9170fba8c9ba4227f9c029b240fff386e3.tar.bz2
scala-a6389e9170fba8c9ba4227f9c029b240fff386e3.zip
- Fixed transformInfo to use the correct type a...
- Fixed transformInfo to use the correct type arguments in base types of classes that don't need an interface.
-rw-r--r--sources/scalac/transformer/AddInterfacesPhase.java18
1 files changed, 13 insertions, 5 deletions
diff --git a/sources/scalac/transformer/AddInterfacesPhase.java b/sources/scalac/transformer/AddInterfacesPhase.java
index fbe91662b0..ee3f939957 100644
--- a/sources/scalac/transformer/AddInterfacesPhase.java
+++ b/sources/scalac/transformer/AddInterfacesPhase.java
@@ -97,11 +97,19 @@ public class AddInterfacesPhase extends PhaseDescriptor {
LinkedList/*<Type>*/ newParentsLst = new LinkedList();
Type[] oldParents = tp.parents();
for (int i = 0; i < oldParents.length; ++i) {
- Symbol oldSym = oldParents[i].unalias().symbol();
- if (needInterface(oldSym))
- newParentsLst.addLast(getClassSymbol(oldSym).type());
- else
- newParentsLst.addLast(oldParents[i]);
+ switch (oldParents[i]) {
+ case TypeRef(Type pre, Symbol oldSym, Type[] args):
+ if (needInterface(oldSym)) {
+ newParentsLst.addLast(
+ Type.typeRef(
+ pre, getClassSymbol(oldSym), args));
+ }
+ else
+ newParentsLst.addLast(oldParents[i]);
+ break;
+ default:
+ throw Debug.abort("illegal case", oldParents[i]);
+ }
}
Type[] newParents = (Type[])
newParentsLst.toArray(new Type[newParentsLst.size()]);