Bug 7291 – UFCS doesn't work for static member functions

Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2012-01-14T12:07:00Z
Last change time
2012-12-02T11:23:46Z
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2012-01-14T12:07:54Z
module test; struct Foo { static void func(string x) { } void foo() { "".func(); } } void main() { } test.d(6): Error: undefined identifier module test.func
Comment #1 by andrej.mitrovich — 2012-12-02T11:23:46Z
This was an enhancement, not a bug. But implementing this could cause issues, namely what about base class static functions, etc. It's better to leave UFCS to module functions.