mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-28 02:23:13 +01:00
Merged DMD commit a10c791c2d6d29db8a4a91d20187636b035c2744:
bugzilla 5026 ICE(expression.c) Incomplete mixin expression + char[] to char assignment
This commit is contained in:
@@ -5153,11 +5153,15 @@ Expression *CompileExp::semantic(Scope *sc)
|
||||
#endif
|
||||
UnaExp::semantic(sc);
|
||||
e1 = resolveProperties(sc, e1);
|
||||
if (!e1->type->isString())
|
||||
{
|
||||
error("argument to mixin must be a string type, not %s\n", e1->type->toChars());
|
||||
return new ErrorExp();
|
||||
}
|
||||
e1 = e1->optimize(WANTvalue | WANTinterpret);
|
||||
if (e1->op != TOKstring)
|
||||
{ error("argument to mixin must be a string, not (%s)", e1->toChars());
|
||||
type = Type::terror;
|
||||
return this;
|
||||
return new ErrorExp();
|
||||
}
|
||||
StringExp *se = (StringExp *)e1;
|
||||
se = se->toUTF8(sc);
|
||||
|
||||
@@ -700,6 +700,7 @@ void FuncDeclaration::semantic3(Scope *sc)
|
||||
{ TypeFunction *f;
|
||||
VarDeclaration *argptr = NULL;
|
||||
VarDeclaration *_arguments = NULL;
|
||||
int nerrors = global.errors;
|
||||
|
||||
if (!parent)
|
||||
{
|
||||
@@ -1512,7 +1513,11 @@ void FuncDeclaration::semantic3(Scope *sc)
|
||||
sc2->callSuper = 0;
|
||||
sc2->pop();
|
||||
}
|
||||
semanticRun = PASSsemantic3done;
|
||||
|
||||
if (global.gag && global.errors != nerrors)
|
||||
semanticRun = PASSsemanticdone; // Ensure errors get reported again
|
||||
else
|
||||
semanticRun = PASSsemantic3done;
|
||||
}
|
||||
|
||||
void FuncDeclaration::toCBuffer(OutBuffer *buf, HdrGenState *hgs)
|
||||
|
||||
Reference in New Issue
Block a user