summaryrefslogtreecommitdiff
path: root/sources/scalac/symtab/classfile/CLRClassParser.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2004-03-10 19:08:48 +0000
committerpaltherr <paltherr@epfl.ch>2004-03-10 19:08:48 +0000
commitbd9f74861ec3e664fc9e94795fd8c16b7580e1df (patch)
treefd24674b44bb117567372ac2590b1f48aeb9036d /sources/scalac/symtab/classfile/CLRClassParser.java
parent5998eb1012cf801a22bf494d55410b44ea452fca (diff)
downloadscala-bd9f74861ec3e664fc9e94795fd8c16b7580e1df.tar.gz
scala-bd9f74861ec3e664fc9e94795fd8c16b7580e1df.tar.bz2
scala-bd9f74861ec3e664fc9e94795fd8c16b7580e1df.zip
- Added factory method Symbol.newConstructor
- Changed method Symbol.addConstructor to receive new constructor - as argument Changed Symbol, Analyzer, class parser and - picklers to use new factory method Removed now unused methods - TermSymbol.makeConstructor/newConstructor
Diffstat (limited to 'sources/scalac/symtab/classfile/CLRClassParser.java')
-rw-r--r--sources/scalac/symtab/classfile/CLRClassParser.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/sources/scalac/symtab/classfile/CLRClassParser.java b/sources/scalac/symtab/classfile/CLRClassParser.java
index 51b156b461..cbcf042e46 100644
--- a/sources/scalac/symtab/classfile/CLRClassParser.java
+++ b/sources/scalac/symtab/classfile/CLRClassParser.java
@@ -199,9 +199,13 @@ public class CLRClassParser extends SymbolLoader {
if (mtype == null)
continue;
Symbol constr = clazz.primaryConstructor();
- if (constr.isInitialized()) constr = clazz.addConstructor();
int mods = translateAttributes(constrs[i]);
- TermSymbol.newConstructor(clazz, mods).copyTo(constr);
+ if (constr.isInitialized()) {
+ clazz.addConstructor(
+ constr = clazz.newConstructor(Position.NOPOS, mods));
+ } else {
+ constr.flags = mods;
+ }
setParamOwners(mtype, constr);
constr.setInfo(mtype);
// System.out.println(clazz.allConstructors() + ": "