src/share/classes/com/sun/tools/javac/code/Symbol.java

changeset 94
6542933af8f4
parent 80
5c9cdeb740f2
child 110
91eea580fbe9
equal deleted inserted replaced
93:30a415f8667f 94:6542933af8f4
921 { 921 {
922 setData(new Callable<Object>() { 922 setData(new Callable<Object>() {
923 public Object call() { 923 public Object call() {
924 JavaFileObject source = log.useSource(env.toplevel.sourcefile); 924 JavaFileObject source = log.useSource(env.toplevel.sourcefile);
925 try { 925 try {
926 // In order to catch self-references, we set
927 // the variable's declaration position to
928 // maximal possible value, effectively marking
929 // the variable as undefined.
930 int pos = VarSymbol.this.pos;
931 VarSymbol.this.pos = Position.MAXPOS;
932 Type itype = attr.attribExpr(initializer, env, type); 926 Type itype = attr.attribExpr(initializer, env, type);
933 VarSymbol.this.pos = pos;
934 if (itype.constValue() != null) 927 if (itype.constValue() != null)
935 return attr.coerce(itype, type).constValue(); 928 return attr.coerce(itype, type).constValue();
936 else 929 else
937 return null; 930 return null;
938 } finally { 931 } finally {

mercurial