Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix Issue 17059 - incorrect circular reference with is(Klass : Interface) #6412

Merged
merged 1 commit into from Jan 10, 2017

Conversation

MartinNowak
Copy link
Member

  • fixed by tweaking the fix for Issue 16980 (fix Issue 16980 - wrong interface called #6383)
  • happened b/c TypeClass::implicitConv -> TypeClass::constConv checks
    for offset == 0, which triggered size finalization
  • instead handle unfinalized classes in isBaseOf (new OFFSET_FWDREF)
    and only explicity finalize size before optimizing casts
  • add a halt for any OFFSET_FWDREF leaking through to IR gen

@dlang-bot
Copy link
Contributor

Fix Bugzilla Description
16980 [REG2.072.0] wrong interface called
17059 [REG 2.072.2] incorrect circular reference with is(Klass : Interface)

…face)`

- fixed by tweaking the fix for Issue 16980 (dlang#6383)
- happened b/c TypeClass::implicitConv -> TypeClass::constConv checks
  for offset == 0, which triggered size finalization
- instead handle unfinalized classes in isBaseOf (new OFFSET_FWDREF)
  and only explicity finalize size before optimizing casts
- add a halt for any OFFSET_FWDREF leaking through to IR gen
// https://issues.dlang.org/show_bug.cgi?id=16980
cdfrom.size(e.loc);
assert(cdfrom.sizeok == SIZEOKdone);
assert(cdto.sizeok == SIZEOKdone || !cdto.isBaseOf(cdto, null));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MartinNowak - is this a typo? cdto.isBaseOf(cdto) - shouldn't the parameter be cdfrom?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes thanks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ibuclaw ibuclaw mentioned this pull request Jun 17, 2017
@ibuclaw
Copy link
Member

ibuclaw commented Oct 19, 2017

This introduced a regression: https://issues.dlang.org/show_bug.cgi?id=17915

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Regression PRs that fix regressions
Projects
None yet
4 participants