https://d.puremagic.com/issues/show_bug.cgi?id=12269
--- Comment #5 from [email protected] 2014-02-28 04:21:45 PST --- struct S(T) { T val; unittest { /// this will fail if 'T' is not int static assert(is(T == int)); } } alias S_Int = S!int; alias S_Float = S!float; // triggers compile-time failure --- Yes, I understand this and I'd expect the compile failure. I don't think it is a good idea to conditionally compile/execute unittests according to whether templates are instantiated, which is why I was saying they should not be treated as regular functions that are subject to template/struct/class scope. Of course that may raise other issues I haven't thought of...I'm not a compiler/language developer by any means :) Anyway, thanks for taking the time to look into this issue. It is only a minor problem due to my preferred unittest structure/workflow. I can work around it easily enough. Cheers, ed -- Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
