[Issue 12300] New: Deprecated variables still accessible using tupleof
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 5 12:49:56 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=12300
Summary: Deprecated variables still accessible using tupleof
Product: D
Version: D1
Platform: All
OS/Version: All
Status: NEW
Keywords: accepts-invalid, industry
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: mathias.baumann at sociomantic.com
--- Comment #0 from Mathias Baumann <mathias.baumann at sociomantic.com> 2014-03-05 12:49:51 PST ---
DMD shows inconcistent behavior when checking for the existance of a deprecated
variable in a struct as the code below shows:
-----
module main;
struct S
{
deprecated int var;
}
void main ()
{
S s;
// Works
static assert ( is ( typeof(s.tupleof[0]) ), "s.tupleof[0] does not exist!"
);
// Fails
static assert ( is ( typeof(s.var) ), "s.var does not exist!" );
}
-------
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list