Bug 21455 – Cannot call an overload aliased from a base struct

Status
NEW
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-12-04T16:12:29Z
Last change time
2024-12-13T19:13:18Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Max Samukha
Moved to GitHub: dmd#18006 →

Comments

Comment #0 by maxsamukha — 2020-12-04T16:12:29Z
struct Base { void foo(int) { } } struct Derived { Base base; alias base this; alias foo = Base.foo; void foo() { foo(1); } } onlineapp.d(13): Error: this for foo needs to be type Base not type Derived Obviously, this should compile because Derived implicitly converts to Base.
Comment #1 by robert.schadek — 2024-12-13T19:13:18Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/18006 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB