[Issue 11930] New: Github regression -- Alias this not considered in is(T unused: U) matching
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 15 05:00:48 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11930
Summary: Github regression -- Alias this not considered in is(T
unused: U) matching
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: puneet at coverify.org
--- Comment #0 from Puneet Goel <puneet at coverify.org> 2014-01-15 05:00:43 PST ---
Seems to have crept in with pull #3066.
class BarObj {}
struct Bar {
BarObj _obj;
alias _obj this;
}
BarObj getBarObj(T)(T t) {
static if(is(T unused: BarObj)) return t;
else static assert(false, "Can not get BarObj from " ~ T.stringof);
}
void main() {
Bar b;
getBarObj(b);
}
--
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