← Back to index
|
Original Bugzilla link
Bug 8319 – selective scoped import
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-06-29T15:21:00Z
Last change time
2012-06-29T21:48:47Z
Assigned to
nobody
Creator
ellery-newcomer
Comments
Comment #0
by ellery-newcomer — 2012-06-29T15:21:41Z
..doesn't work for example: auto z(T)(T x) { import std.traits: isPointer; static assert(isPointer!T); return 1; } void main() { z(1); z("a".ptr); } gives me: test.d(3): Error: template instance isPointer!(int) template 'isPointer' is not defined test.d(8): Error: template instance test.z!(int) error instantiating test.d(3): Error: template instance isPointer!(immutable(char)*) template 'isPointer' is not defined test.d(9): Error: template instance test.z!(immutable(char)*) error instantiating whereas: auto z(T)(T x) { import std.traits; static assert(isPointer!T); return 1; } void main() { z(1); z("a".ptr); } sees isPointer and asserts as expected. dmd 2.059.
Comment #1
by bearophile_hugs — 2012-06-29T16:30:27Z
This is a dupe, please search for it.
Comment #2
by ellery-newcomer — 2012-06-29T17:26:09Z
(In reply to comment #1) > This is a dupe, please search for it. before posting, I searched for scoped import and got nothing.
Comment #3
by k.hara.pg — 2012-06-29T21:48:47Z
This is a dup of issue 7494, and it's already fixed in 2.060head. *** This issue has been marked as a duplicate of issue 7494 ***