mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-05-17 23:41:29 +02:00
Merge of v2.063.2
This commit is contained in:
@@ -8412,6 +8412,8 @@ Lagain:
|
||||
{
|
||||
e1 = new DotVarExp(loc, dte->e1, f);
|
||||
e1 = e1->semantic(sc);
|
||||
if (e1->op == TOKerror)
|
||||
return new ErrorExp();
|
||||
ue = (UnaExp *)e1;
|
||||
}
|
||||
#if 0
|
||||
@@ -8872,31 +8874,34 @@ Expression *AddrExp::semantic(Scope *sc)
|
||||
{
|
||||
DotTemplateInstanceExp* dti = (DotTemplateInstanceExp *)e1;
|
||||
TemplateInstance *ti = dti->ti;
|
||||
assert(!ti->semanticRun);
|
||||
//assert(ti->needsTypeInference(sc));
|
||||
ti->semantic(sc);
|
||||
if (!ti->inst) // if template failed to expand
|
||||
return new ErrorExp;
|
||||
Dsymbol *s = ti->inst->toAlias();
|
||||
FuncDeclaration *f = s->isFuncDeclaration();
|
||||
assert(f);
|
||||
e1 = new DotVarExp(e1->loc, dti->e1, f);
|
||||
e1 = e1->semantic(sc);
|
||||
if (!ti->semanticRun)
|
||||
{
|
||||
//assert(ti->needsTypeInference(sc));
|
||||
ti->semantic(sc);
|
||||
if (!ti->inst) // if template failed to expand
|
||||
return new ErrorExp;
|
||||
Dsymbol *s = ti->inst->toAlias();
|
||||
FuncDeclaration *f = s->isFuncDeclaration();
|
||||
assert(f);
|
||||
e1 = new DotVarExp(e1->loc, dti->e1, f);
|
||||
e1 = e1->semantic(sc);
|
||||
}
|
||||
}
|
||||
else if (e1->op == TOKimport &&
|
||||
((ScopeExp *)e1)->sds->isTemplateInstance())
|
||||
else if (e1->op == TOKimport)
|
||||
{
|
||||
TemplateInstance *ti = (TemplateInstance *)((ScopeExp *)e1)->sds;
|
||||
assert(!ti->semanticRun);
|
||||
//assert(ti->needsTypeInference(sc));
|
||||
ti->semantic(sc);
|
||||
if (!ti->inst) // if template failed to expand
|
||||
return new ErrorExp;
|
||||
Dsymbol *s = ti->inst->toAlias();
|
||||
FuncDeclaration *f = s->isFuncDeclaration();
|
||||
assert(f);
|
||||
e1 = new VarExp(e1->loc, f);
|
||||
e1 = e1->semantic(sc);
|
||||
TemplateInstance *ti = ((ScopeExp *)e1)->sds->isTemplateInstance();
|
||||
if (ti && !ti->semanticRun)
|
||||
{
|
||||
//assert(ti->needsTypeInference(sc));
|
||||
ti->semantic(sc);
|
||||
if (!ti->inst) // if template failed to expand
|
||||
return new ErrorExp;
|
||||
Dsymbol *s = ti->inst->toAlias();
|
||||
FuncDeclaration *f = s->isFuncDeclaration();
|
||||
assert(f);
|
||||
e1 = new VarExp(e1->loc, f);
|
||||
e1 = e1->semantic(sc);
|
||||
}
|
||||
}
|
||||
e1 = e1->toLvalue(sc, NULL);
|
||||
if (e1->op == TOKerror)
|
||||
@@ -11099,7 +11104,7 @@ Ltupleassign:
|
||||
// Disallow sa = e (Converted to sa[] = e)
|
||||
const char* e1str = e1->toChars();
|
||||
const char* e2str = e2->toChars();
|
||||
if (e2->op == TOKslice || t2->implicitConvTo(t1->nextOf()))
|
||||
if (e2->op == TOKslice || e2->implicitConvTo(t1->nextOf()))
|
||||
warning("explicit element-wise assignment (%s)[] = %s is better than %s = %s",
|
||||
e1str, e2str, e1str, e2str);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user