https://issues.dlang.org/show_bug.cgi?id=14653

--- Comment #7 from Ketmar Dark <[email protected]> ---
that's `inferAggregate()` which pulls out aliased type from wrapper, rewriting
it from `wrapit()` to `wrapit().rng`, and semantic then rewrites it to
`(Wrapper __tmpfordtor3 = wrapit(); , __tmpfordtor3).rng`. it does this:

  if (ad->aliasthis)
  {
      if (!att && tab->checkAliasThisRec())
          att = tab;
      fes->aggr = new DotIdExp(fes->aggr->loc, fes->aggr,
ad->aliasthis->ident);
      continue;
  }

i.e. literally pulling away aliased struct with `DotIdExp` (and dtoring result
of `wrapit()` by the way, as it thinks that it's not required anymore.

seems that `inferAggregate()` must postpone dtor calling for such cases.

--

Reply via email to