summaryrefslogtreecommitdiff
path: root/sources/scalac/symtab/Symbol.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-07-15 15:17:55 +0000
committerpaltherr <paltherr@epfl.ch>2003-07-15 15:17:55 +0000
commitb82944e86b633ec91b435b647d6db7a66107c924 (patch)
tree449d545a99c4c123b23a752162953ac356170cac /sources/scalac/symtab/Symbol.java
parent40eddc459e87ff08d484be9b981fb93c903be265 (diff)
downloadscala-b82944e86b633ec91b435b647d6db7a66107c924.tar.gz
scala-b82944e86b633ec91b435b647d6db7a66107c924.tar.bz2
scala-b82944e86b633ec91b435b647d6db7a66107c924.zip
- Added a missing isMethod test on LambdaLiftPh...
- Added a missing isMethod test on LambdaLiftPhase.proxy - Added some assertion checks to Type.typeParams and Type.valueParams - Patched ClassSymbol.typeParams and LambdaLiftPhase.TransformTypeMap.apply to hide bug of method Symbol.constructor (see comment is those two methods).
Diffstat (limited to 'sources/scalac/symtab/Symbol.java')
-rw-r--r--sources/scalac/symtab/Symbol.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java
index 62b6f1200a..a67669075a 100644
--- a/sources/scalac/symtab/Symbol.java
+++ b/sources/scalac/symtab/Symbol.java
@@ -1357,7 +1357,17 @@ public class ClassSymbol extends TypeSymbol {
/** Get type parameters */
public Symbol[] typeParams() {
- return constructor.info().typeParams();
+ // !!! For some Java classes, constructor() returns an
+ // Overloaded symbol. This is wrong as constructor() should
+ // return the primary constructor. Once this problem is
+ // solved, the following switch can be removed.
+ Type constrtype = constructor.info();
+ switch (constrtype) {
+ case OverloadedType(_, _):
+ return Symbol.EMPTY_ARRAY;
+ default:
+ return constrtype.typeParams();
+ }
}
public Symbol[] valueParams() {