mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-27 09:03:15 +01:00
Merge DMD r294: bugzilla 2816 Sudden-death static assert is not...
bugzilla 2816 Sudden-death static assert is not very useful. --- dmd/expression.h | 12 ++++++ dmd/staticassert.c | 10 +--- dmd/template.c | 108 ++++++++++++++++++++++++++++++++++++++++++++++++---- dmd/template.h | 2 + 4 files changed, 117 insertions(+), 15 deletions(-)
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
#include "hdrgen.h"
|
||||
#include "scope.h"
|
||||
#include "template.h"
|
||||
#include "declaration.h"
|
||||
|
||||
|
||||
/********************************* AttribDeclaration ****************************/
|
||||
@@ -48,10 +49,6 @@ void StaticAssert::semantic(Scope *sc)
|
||||
{
|
||||
}
|
||||
|
||||
#include "scope.h"
|
||||
#include "template.h"
|
||||
#include "declaration.h"
|
||||
|
||||
void StaticAssert::semantic2(Scope *sc)
|
||||
{
|
||||
Expression *e;
|
||||
@@ -73,11 +70,10 @@ void StaticAssert::semantic2(Scope *sc)
|
||||
}
|
||||
else
|
||||
error("(%s) is false", exp->toChars());
|
||||
if(sc->tinst)
|
||||
if (sc->tinst)
|
||||
sc->tinst->printInstantiationTrace();
|
||||
if (!global.gag) {
|
||||
if (!global.gag)
|
||||
fatal();
|
||||
}
|
||||
}
|
||||
else if (!e->isBool(TRUE))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user