https://d.puremagic.com/issues/show_bug.cgi?id=11990
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Component|Phobos |DMD Severity|major |critical --- Comment #1 from Kenji Hara <[email protected]> 2014-01-25 10:52:21 PST --- Reduced test case. void main() { test("abcdefg"); } void test(string str) { void bar(string sstr, size_t end = str.length-1) { import std.stdio; writeln(sstr.length, " ", end); } foo!(bar)(str[0..4]); } void foo(alias fun)(string s) { fun(s); } Prints: 4 4294967295 The second parameter 'end' is assigned garbage because 'str' parameter of test function is not directly accessible from 'foo' function. Raised importance to 'critical' because it's wrong-code generation bug. -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
