```d
import dparse.ast;
import dparse.lexer;
import dparse.parser : parseModule;
import dparse.rollback_allocator : RollbackAllocator;
import core.stdcpp.vector;
import core.stdcpp.string;

Vector!string d=[];toV(a,d);
print(d);//3
foreach(e;d){
    string b=d[i];
    string m=readText(b);ff(m,b);
}

void ff(string B,string s)
{
    LexerConfig config;
    auto cache = StringCache(StringCache.defaultBucketCount);
    auto tokens = getTokensForParser(B, config, &cache);
    RollbackAllocator rba;
    auto m = parseModule(tokens,s, &rba);
    auto v= new V();
    v.visit(m);v.out(s);
}

```
Why can `b` still affect `e` here? Isn't `b` copied?
here foreach crashes.

Reply via email to