[Issue 12388] New: UFCS fails with "no property" error if symbol exists in scope
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 17 03:37:48 PDT 2014
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: nobody at puremagic.com
ReportedBy: thecybershadow at gmail.com
--- Comment #0 from Vladimir Panteleev <thecybershadow at gmail.com> 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: -------
More information about the Digitalmars-d-bugs
mailing list