Skip to content

Commit

Permalink
expressionsem.d reduce indentation
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilsonator committed Sep 23, 2024
1 parent ff9ae4e commit ec6dcca
Showing 1 changed file with 27 additions and 25 deletions.
52 changes: 27 additions & 25 deletions compiler/src/dmd/expressionsem.d
Original file line number Diff line number Diff line change
Expand Up @@ -3991,35 +3991,37 @@ private extern (C++) final class ExpressionSemanticVisitor : Visitor
if (!sc2.scopesym)
continue;

if (auto ss = sc2.scopesym.isWithScopeSymbol())
auto ss = sc2.scopesym.isWithScopeSymbol();
if (!ss)
continue;

if (ss.withstate.wthis)
{
if (ss.withstate.wthis)
Expression e;
e = new VarExp(exp.loc, ss.withstate.wthis);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
Expression e;
e = new VarExp(exp.loc, ss.withstate.wthis);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
result = e;
return;
}
// Try Type.opDispatch (so the static version)
else if (ss.withstate.exp && ss.withstate.exp.op == EXP.type)
}
// Try Type.opDispatch (so the static version)
else if (ss.withstate.exp && ss.withstate.exp.op == EXP.type)
{
Type t = ss.withstate.exp.isTypeExp().type;
if (!t)
continue;

Expression e;
e = new TypeExp(exp.loc, t);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
if (Type t = ss.withstate.exp.isTypeExp().type)
{
Expression e;
e = new TypeExp(exp.loc, t);
e = new DotIdExp(exp.loc, e, exp.ident);
e = e.trySemantic(sc);
if (e)
{
result = e;
return;
}
}
result = e;
return;
}
}
}
Expand Down

0 comments on commit ec6dcca

Please sign in to comment.