Skip to content

Fix #4031: Check arguments of dependent methods for realizability #4036

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

Closed
wants to merge 15 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cache stability of non-lazy stable symbols
That is, set is(Stable) for symbols that satisfy isStable.
  • Loading branch information
Blaisorblade committed Aug 16, 2018
commit 37b87202a48ded19335d69a7c2dbbfa882ab3d2c
10 changes: 5 additions & 5 deletions compiler/src/dotty/tools/dotc/core/CheckRealizable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,12 @@ class CheckRealizable(implicit ctx: Context) {
if (!sym.isStable)
patchRealizability(NotStable)
// 3. If the symbol isn't "lazy" and its prefix is realizable
else if (!isLateInitialized(sym))
// XXX: This is a bit fishy: we only cache that the symbol is
// stable if it appears under a realizable prefix.
// XXX: Add object DependsOnPrefix extends Realizability(""), but filter it out here.
else if (!isLateInitialized(sym)) {
// The symbol itself is stable, cache this information:
sym.setFlag(Stable)
// Realizability now depends on the prefix:
patchRealizability(realizability(tp.prefix))
else if (!sym.isEffectivelyFinal)
} else if (!sym.isEffectivelyFinal)
patchRealizability(new NotFinal(sym))
else
// 4. If the symbol is effectively final, and a lazy or erased val
Expand Down