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: [email protected]
Reporter: [email protected]
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
--
