Skip to content

Simplify super call handling: remove inConstrCall, remove InSuperCall #8591

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

Merged
merged 3 commits into from
Mar 22, 2020
Merged
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
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,7 @@ class TreeUnpickler(reader: TastyReader,
readByte()
val end = readEnd()
val tp = readType()
val lazyAnnotTree = readLaterWithOwner(end, rdr => ctx => rdr.readTerm()(ctx))
val lazyAnnotTree = readLaterWithOwner(end, rdr => implicit ctx => rdr.readTerm())
Copy link
Contributor

Choose a reason for hiding this comment

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

I propose we go to the new syntax (using ctx) => rdr.readTerm().

Copy link
Member Author

Choose a reason for hiding this comment

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

That doesn't work because the expected type is not a context function type but a regular function type, and I was hesitant to change this since it'll make it harder to port code between the Scala 2 and 3 readers.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK


owner =>
Annotation.deferredSymAndTree(tp.typeSymbol)(lazyAnnotTree(owner).complete)
Expand Down Expand Up @@ -780,7 +780,7 @@ class TreeUnpickler(reader: TastyReader,
def complete(implicit ctx: Context) = typer.Inliner.bodyToInline(sym)
}
else
readLater(end, rdr => ctx => rdr.readTerm()(ctx))
readLater(end, rdr => implicit ctx => rdr.readTerm())
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto


def ValDef(tpt: Tree) =
ta.assignType(untpd.ValDef(sym.name.asTermName, tpt, readRhs(localCtx)), sym)
Expand Down