Bug 8814 – Issues casting opDispatch property when a write property exists

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-10-13T12:46:48Z
Last change time
2024-12-13T18:01:43Z
Assigned to
No Owner
Creator
siegelords_abode
Moved to GitHub: dmd#18475 →

Comments

Comment #0 by siegelords_abode — 2012-10-13T12:46:48Z
DMDFE 2.059 and 2.060: struct A { @property int opDispatch(string s)() { return 1; } /* Works without error if the write property is removed */ @property void opDispatch(string s)(int val) { } } void main() { auto a = A(); auto b = cast(int)a.test; // test.d(19): Error: cannot cast a.opDispatch!("test") }
Comment #1 by robert.schadek — 2024-12-13T18:01:43Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18475 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB