[Issue 13333] New: Incorrect error ungagging during the resolution of forward references
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Aug 19 05:33:30 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13333
Issue ID: 13333
Summary: Incorrect error ungagging during the resolution of
forward references
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: k.hara.pg at gmail.com
Blocks: 13300
By fixing issue 13204, this code should be allowed, but doesn't.
template AliasThisTypeOf(T)
{
static assert(0, T.stringof); // T.stringof is important
}
template StaticArrayTypeOf(T)
{
static if (is(AliasThisTypeOf!T AT))
alias X = StaticArrayTypeOf!AT;
else
alias X = T;
static if (is(X : E[n], E, size_t n))
alias StaticArrayTypeOf = X;
else
static assert(0, T.stringof~" is not a static array type");
}
enum bool isStaticArray(T) = is(StaticArrayTypeOf!T);
struct VaraiantN(T)
{
static if (isStaticArray!T)
~this() { static assert(0); }
}
struct DummyScope
{
alias A = VaraiantN!C;
static class C
{
A entity;
}
}
Blocking issue 13300.
--
More information about the Digitalmars-d-bugs
mailing list