[Issue 8704] New: Invalid nested struct constructions should be detected
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Sep 21 07:02:53 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8704
Summary: Invalid nested struct constructions should be detected
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: accepts-invalid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: k.hara.pg at gmail.com
--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2012-09-21 07:03:47 PDT ---
By fixing issue 8339, invalid accessing to nested struct shows compile error.
But, some cases are still accidentally accepted.
void check(T)()
{
// nested struct constructions outside valid frame scope
T t1 = T();
T t2 = T(1);
}
void main()
{
struct S
{
int n;
void foo(){}
}
check!S();
}
--
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