Bug 20274 – IFTI fails for opDispatch and 'with'

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2019-10-06T20:49:34Z
Last change time
2024-12-13T19:05:49Z
Assigned to
No Owner
Creator
Max Samukha
Moved to GitHub: dmd#19628 →

Comments

Comment #0 by maxsamukha — 2019-10-06T20:49:34Z
struct A { void opDispatch(string name, A...)(A a) { } } struct B { void opDispatch(string name, T)(T a) { } } void main() { A a; a.foo(2); // ok with (a) { foo(2); // fails } B b; b.foo(3); // ok with(b) { foo(3); // fails } } test.d(18): Error: function expected before (), not (*__withSym).opDispatch() of type void test.d(25): Error: undefined identifier foo
Comment #1 by robert.schadek — 2024-12-13T19:05:49Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19628 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB