Bug 11930 – Github regression -- Alias this not considered in is(T unused: U) matching
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-01-15T05:00:00Z
Last change time
2014-01-22T18:18:53Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
puneet
Comments
Comment #0 by puneet — 2014-01-15T05:00:43Z
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);
}