Skip to content

Commit

Permalink
escape.d: remove redundant notMaybeScope
Browse files Browse the repository at this point in the history
  • Loading branch information
dkorpel authored and dlang-bot committed Jul 24, 2024
1 parent a6a0fe5 commit 8e787a2
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions compiler/src/dmd/escape.d
Original file line number Diff line number Diff line change
Expand Up @@ -1306,16 +1306,10 @@ private bool checkReturnEscapeImpl(ref Scope sc, Expression e, bool refs, bool g
Dsymbol p = v.toParent2();

// https://issues.dlang.org/show_bug.cgi?id=19965
if (!refs)
if (!refs && checkScopeVarAddr(v, e, sc, gag))
{
if (sc.func.vthis == v)
notMaybeScope(v, e);

if (checkScopeVarAddr(v, e, sc, gag))
{
result = true;
return;
}
result = true;
return;
}

if (!v.isReference())
Expand Down

0 comments on commit 8e787a2

Please sign in to comment.