Bug 498 – Signal mixins need to import

Status
RESOLVED
Resolution
FIXED
Severity
major
Priority
P2
Component
phobos
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2006-11-12T18:31:00Z
Last change time
2014-02-15T13:28:46Z
Assigned to
bugzilla
Creator
daekharel

Comments

Comment #0 by daekharel — 2006-11-12T18:31:06Z
std.signal's Signal template relies on having std.stdio, std.c.stdlib, and std.outofmemory available where it is instantiated, since it has to be mixed in, and is therefore evaluated in the scope where it is instantiated, not in the scope of the std.signals module. This means anyone wishing to use std.signals must import those modules, which is undocumented. Either this should be documented, or (better yet) the Signal template itself should import the required modules, like so: template Signal(T1...) { import std.outofmemory, std.stdio, std.c.stdlib; ... rest of template body ... }
Comment #1 by matti.niemenmaa+dbugzilla — 2006-11-15T03:01:19Z
Fixed in DMD 0.174.