[Issue 7965] Invalid outer function scope pointer in some cases
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 2 01:40:55 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7965
--- Comment #5 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2012-07-02 12:43:33 MSD ---
Reduced test-case:
---
struct S
{
string str;
uint unused1, unused2 = 0;
}
auto f(alias fun)()
{
struct Result
{
S s;
this(S _s) { s = _s; }
void g() { assert(fun(s.str) == "xa"); }
}
return Result(S("a"));
}
void main() {
string s = "x";
f!(a => s ~= a)().g();
assert(s == "xa");
}
---
--
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