[Issue 1170] Cannot forward reference a type defined in a MixinStatement

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 23 13:55:33 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=1170



--- Comment #1 from Rainer Schuetze <r.sagitario at gmx.de> 2009-09-23 13:55:32 PDT ---
Created an attachment (id=464)
invalidate symbol search cache when adding new symbol

the problem in the test case consists of 2 issues. 
1. the forward referencing of the type. this is fixed by the patch in issue 102
2. the new symbol not being found in the symbol table. This can be reproduced
without triggering bug 102 by

static if(is(type)) {}
mixin("alias int type;");
type x;

test.d(3): Error: identifier 'type' is not defined

The problem is that the last symbol being searched in a module is cached to
speed up consecutive lookups of the same symbol. When a symbol is added by the
mixin, this cached result is not invalidated. The patch adds this invalidation.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list