Bug 10698 – opDispatch called as property over struct field even when opDispatch requires runtime arguments

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-07-22T10:45:41Z
Last change time
2024-12-13T18:09:43Z
Assigned to
No Owner
Creator
Meta
Moved to GitHub: dmd#18637 →

Comments

Comment #0 by monkeyworks12 — 2013-07-22T10:45:41Z
import std.stdio; struct Test1 { int i; } struct Test2 { Test1 test1; alias test1 this; int opDispatch(string id)(string dummy) { return 42; } } void main() { Test2 test2; writeln(test2.i); } /d663/f665.d(22): Error: function f665.Test2.opDispatch!("i").opDispatch (string dummy) is not callable using argument types () Fails on DMD 2.063, GDC 2.060, LDC 2.060, and git HEAD. http://dpaste.dzfl.pl/c3a50642
Comment #1 by robert.schadek — 2024-12-13T18:09:43Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18637 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB