Bug 12388 – UFCS fails with "no property" error if symbol exists in scope

Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-17T03:37:47Z
Last change time
2018-05-31T12:36:56Z
Keywords
rejects-valid
Assigned to
No Owner
Creator
Vladimir Panteleev

Comments

Comment #0 by dlang-bugzilla — 2014-03-17T03:37:47Z
//////// a.d //////// struct S { import b; void fun(int i) { "test".fun(); } } //////// b.d //////// void fun(string s) {} ///////////////////// Compiler output: a.d(7): Error: no property 'fun' for type 'string' The code compiles if b.fun's name is changed to be different from a.S.fun's.
Comment #1 by razvan.nitu1305 — 2018-05-31T10:53:30Z
Cannot reproduce on git HEAD (DMD64 D Compiler v2.079.0). Closing as fixed.