[Issue 19158] New: declaration is already defined in another scope in main at line
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Aug 11 16:27:17 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=19158
Issue ID: 19158
Summary: declaration is already defined in another scope in
main at line
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: ali.akhtarzada at gmail.com
void main()
{
{
struct S {}
}
{
struct S {}
}
}
Produces
onlineapp.d(8): Error: declaration onlineapp.main.S is already defined in
another scope in main at line 5
It should be possible to do this as they are in different scopes and should've
be different than declaring a variable in different scopes.
Issue 18266 was resolved but only "half" fixed - i.e. the ICE part. So I'm
creating this one to keep track of the other half of that issue.
--
More information about the Digitalmars-d-bugs
mailing list