mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-04-08 04:49:02 +02:00
Merged 2.056
This commit is contained in:
@@ -813,6 +813,9 @@ Initializer *ExpInitializer::semantic(Scope *sc, Type *t, int needInterpret)
|
||||
if (!global.gag && olderrors != global.errors)
|
||||
return this; // Failed, suppress duplicate error messages
|
||||
|
||||
if (exp->op == TOKtype)
|
||||
error("initializer must be an expression, not '%s'", exp->toChars());
|
||||
|
||||
// Make sure all pointers are constants
|
||||
if (needInterpret && hasNonConstPointers(exp))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user