mirror of
https://github.com/dlang/dmd.git
synced 2025-04-28 06:00:13 +03:00
Fix 23722 - Lambdas are mangled incorrectly when using multiple compi… (#15343)
* Fix 23722 - Lambdas are mangled incorrectly when using multiple compilation units, resulting in incorrect code * Update test cases
This commit is contained in:
parent
4c645bbaf9
commit
a3abf1187e
44 changed files with 102 additions and 84 deletions
|
@ -5548,7 +5548,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
|||
{
|
||||
if (exp.fd.ident == Id.empty)
|
||||
{
|
||||
const(char)[] s;
|
||||
string s;
|
||||
if (exp.fd.fes)
|
||||
s = "__foreachbody";
|
||||
else if (exp.fd.tok == TOK.reserved)
|
||||
|
@ -5582,7 +5582,7 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
|
|||
symtab = sds.symtab;
|
||||
}
|
||||
assert(symtab);
|
||||
Identifier id = Identifier.generateId(s, symtab.length() + 1);
|
||||
Identifier id = Identifier.generateIdWithLoc(s, exp.loc);
|
||||
exp.fd.ident = id;
|
||||
if (exp.td)
|
||||
exp.td.ident = id;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue