equal
deleted
inserted
replaced
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 { |