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); }
Comment #1 by k.hara.pg — 2014-01-15T09:43:54Z
https://github.com/D-Programming-Language/dmd/pull/3105 It has been caused by fixing issue 11875.
Comment #2 by puneet — 2014-01-15T09:54:13Z
(In reply to comment #1) > https://github.com/D-Programming-Language/dmd/pull/3105 Works for me.
Comment #3 by github-bugzilla — 2014-01-15T19:27:08Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/a58b3735f6a5cf071605e6f2606e7f1be3d6c38f Issue 11930 - Alias this not considered in is(T unused: U) matching https://github.com/D-Programming-Language/dmd/commit/7ecbbce5fdbe36db303ac21b26aee7a226657488 Merge pull request #3105 from 9rnsr/fix11930 [REG2.065a] Issue 11930 - Alias this not considered in is(T unused: U) matching
Comment #4 by github-bugzilla — 2014-01-22T18:18:53Z
Commit pushed to release at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/287a7d107df20169b256b432ac9e048fde73e1fa Merge pull request #3105 from 9rnsr/fix11930 [REG2.065a] Issue 11930 - Alias this not considered in is(T unused: U) matching