[Issue 12881] New: Cannot declare a function in foreach over tuple
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Mon Jun 9 02:36:19 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=12881
Issue ID: 12881
Summary: Cannot declare a function in foreach over tuple
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: blocker
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: temtaime at gmail.com
import std.typetuple;
void main() {
foreach(i; TypeTuple!(1, 2)) {
int foo() { return i; }
}
}
Error: declaration foo is already defined in another scope in main
--
More information about the Digitalmars-d-bugs
mailing list