summaryrefslogtreecommitdiff
path: root/sources/scalac/symtab/Symbol.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-11-17 11:46:19 +0000
committerpaltherr <paltherr@epfl.ch>2003-11-17 11:46:19 +0000
commit1bb18c95ae1d25c208947dafed39f9d9061fdf6b (patch)
treeaecf767f97f3cbcf21b75000d1ca8f34a8f746f7 /sources/scalac/symtab/Symbol.java
parent7318a7e03d040182098505f2f764c3e836bfe883 (diff)
downloadscala-1bb18c95ae1d25c208947dafed39f9d9061fdf6b.tar.gz
scala-1bb18c95ae1d25c208947dafed39f9d9061fdf6b.tar.bz2
scala-1bb18c95ae1d25c208947dafed39f9d9061fdf6b.zip
- Fixed rawInfoAt to no force lazy types
- Fixed info to evaluate lazy types in right phase
Diffstat (limited to 'sources/scalac/symtab/Symbol.java')
-rw-r--r--sources/scalac/symtab/Symbol.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/sources/scalac/symtab/Symbol.java b/sources/scalac/symtab/Symbol.java
index dbc5666727..878528accb 100644
--- a/sources/scalac/symtab/Symbol.java
+++ b/sources/scalac/symtab/Symbol.java
@@ -780,8 +780,10 @@ public abstract class Symbol implements Modifiers, Kinds {
*/
public final Type info() {
//if (isModule()) moduleClass().initialize();
- Phase phase = Global.instance.currentPhase;
if ((flags & INITIALIZED) == 0) {
+ Global global = Global.instance;
+ Phase current = global.currentPhase;
+ global.currentPhase = rawFirstInfoStartPhase();
Type info = rawFirstInfo();
assert info != null : this;
if ((flags & LOCKED) != 0) {
@@ -798,12 +800,13 @@ public abstract class Symbol implements Modifiers, Kinds {
Type tp = info();
flags &= ~SNDTIME;
} else {
- assert !(rawInfoAt(phase) instanceof Type.LazyType) : this;
+ assert !(rawInfo() instanceof Type.LazyType) : this;
//flags |= INITIALIZED;
}
//System.out.println("done: " + this);//DEBUG
+ global.currentPhase = current;
}
- return rawInfoAt(phase);
+ return rawInfo();
}
/** Get info at start of next phase
@@ -848,6 +851,11 @@ public abstract class Symbol implements Modifiers, Kinds {
assert infos != null : this;
assert phase != null : this;
if (infos.limit().precedes(phase)) {
+ switch (infos.info) {
+ case LazyType():
+ // don't force lazy types
+ return infos.info;
+ }
while (infos.limit().next != phase) {
Phase next = infos.limit().next;
Type info = transformInfo(next, infos.info);