http://d.puremagic.com/issues/show_bug.cgi?id=8711
yebblies <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] Platform|x86 |All OS/Version|Windows |All Severity|major |normal --- Comment #1 from yebblies <[email protected]> 2013-01-03 02:20:22 EST --- It is valid to initialize a pointer to T with an array of T, unless it is a function pointer. Lowering the priority because the first error _does_ have a line number, and the second is just nonsense. @@ -493,13 +493,12 @@ Initializer *ArrayInitializer::semantic(Scope *sc, Type *t, NeedInterpret needIn type = t; Initializer *aa = NULL; t = t->toBasetype(); switch (t->ty) { - case Tpointer: case Tsarray: case Tarray: break; case Tvector: t = ((TypeVector *)t)->basetype; break; case Taarray: // was actually an associative array literal aa = new ExpInitializer(loc, toAssocArrayLiteral()); return aa->semantic(sc, t, needInterpret); + case Tpointer: + if (t->nextOf()->ty != Tfunction) + break; default: error(loc, "cannot use array to initialize %s", type->toChars()); goto Lerr; } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
