← Back to index
|
Original Bugzilla link
Bug 10609 – Refused UFCS in __traits(compile)
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-11T05:13:00Z
Last change time
2013-07-16T18:06:51Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Depends on
10618
Comments
Comment #0
by bearophile_hugs — 2013-07-11T05:13:26Z
int foo(int x) { return x; } void main() { immutable x = 1; static if (__traits(compiles, foo(x))) pragma(msg, "OK1"); static if (__traits(compiles, 1.foo)) pragma(msg, "OK2"); static if (__traits(compiles, x.foo)) pragma(msg, "OK3"); } Prints: OK1 OK2 Expected: OK1 OK2 OK3
Comment #1
by k.hara.pg — 2013-07-11T19:55:59Z
*** Issue 9688 has been marked as a duplicate of this issue. ***
Comment #2
by k.hara.pg — 2013-07-11T20:38:55Z
https://github.com/D-Programming-Language/dmd/pull/2337
Comment #3
by github-bugzilla — 2013-07-16T18:06:36Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/b37e2c49ff026bd880eb49ed4e2dd70ee8ba1d0e
fix Issue 10609 - Refused UFCS in __traits(compile)
https://github.com/D-Programming-Language/dmd/commit/b1467fabffad1889b28bafb76e32a6acae4b78e4
Merge pull request #2337 from 9rnsr/fix10609 Issue 10609 - Refused UFCS in __traits(compile)