Bug 625 – [module] static import and renamed import of mixin don't work
Status
RESOLVED
Resolution
WONTFIX
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2006-12-01T19:37:00Z
Last change time
2014-02-15T13:19:12Z
Assigned to
bugzilla
Creator
wbaxter
Comments
Comment #0 by wbaxter — 2006-12-01T19:37:54Z
[resubmission of issue http://d.puremagic.com/issues/show_bug.cgi?id=506 as an enhancement.]
static import and renamed import of a mixin don't work if the mixin itself has
imports.
This is a continuation of
http://d.puremagic.com/issues/show_bug.cgi?id=498
which covers the basic import case. The fix for that however does not fix the
static import and renamed import cases (import sigs=std.signals) cases.
Here's examples:
------
import sigs=std.signals;
class SigObj
{
mixin sigs.Signal!();
}
void main()
{
}
----
static import std.signals;
class SigObj
{
mixin std.signals.Signal!();
}
void main()
{
}
Got that bug report wrong the first time.
Mixin templates are evaluated at instantiation scope.
Libraries need to make sure that all their dependencies
are self-contained, i.e. by import needed modules within
the mixin or by combining templates and mixin templates.