[Issue 8319] New: selective scoped import
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jun 29 15:19:07 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8319
Summary: selective scoped import
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: ellery-newcomer at utulsa.edu
--- Comment #0 from Ellery Newcomer <ellery-newcomer at utulsa.edu> 2012-06-29 15:21:41 PDT ---
..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.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list