https://d.puremagic.com/issues/show_bug.cgi?id=12388
Summary: UFCS fails with "no property" error if symbol exists
in scope
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Vladimir Panteleev <[email protected]> 2014-03-17
12:37:47 EET ---
//////// 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.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------