← Back to index
|
Original Bugzilla link
Bug 7538 – All kinds of property functions should be called before getting their types inside typeof
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-02-18T07:48:00Z
Last change time
2014-09-14T14:52:28Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
k.hara.pg
Comments
Comment #0
by k.hara.pg — 2012-02-18T07:48:12Z
Test case; ---- @property int foo(){ return 1; } @property int bar()(){ return 2; } @property int baz(T)(){ return 2; } struct S { @property int foo(){ return 1; } @property int bar()(){ return 2; } @property int baz(T)(){ return 2; } } void main() { static assert(is(typeof(foo) == int)); // OK static assert(is(typeof(bar) == int)); // failed static assert(is(typeof(baz!int) == int)); // OK S s; static assert(is(typeof(s.foo) == int)); // OK static assert(is(typeof(s.bar) == int)); // failed static assert(is(typeof(s.baz!int) == int)); // OK }
Comment #1
by k.hara.pg — 2013-06-02T09:09:33Z
https://github.com/D-Programming-Language/dmd/pull/2123
Comment #2
by github-bugzilla — 2013-07-10T12:24:41Z
Commits pushed to master at
https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/1093dbe73f2414f4c03706e99888e0764b42fa65
fix Issue 7538 - All kinds of property functions should be called before getting their types inside typeof
https://github.com/D-Programming-Language/dmd/commit/88b60e77fa9dea5487ebaa019c325910193f34aa
Merge pull request #2123 from 9rnsr/fix7538 Issue 7538 - All kinds of property functions should be called before getting their types inside typeof
Comment #3
by k.hara.pg — 2014-09-14T14:52:28Z
*** Issue 8683 has been marked as a duplicate of this issue. ***