Skip to content

Delete dead code in PostTyper - #27639

Open
SolalPirelli wants to merge 3 commits into
scala:mainfrom
dotty-staging:solal/dead-feature-query
Open

SolalPirelli wants to merge 3 commits into
scala:mainfrom
dotty-staging:solal/dead-feature-query

Conversation

@SolalPirelli

Copy link
Copy Markdown
Contributor

Gated by a Feature.shouldBehaveAsScala2 check that cannot ever trigger because that's only set by the parser upon encountering an import, yet PostTyper queried it when setting the phase's context before the parser has run.

Have you relied on LLM-based tools in this contribution?

No

How was the solution tested?

Covered by existing tests (this is a refactoring)

@SolalPirelli
SolalPirelli force-pushed the solal/dead-feature-query branch from c2c23bd to 2e4ce36 Compare November 27, 2026 14:29
@SolalPirelli
SolalPirelli marked this pull request as ready for review November 27, 2026 14:30
if parents1 ne info.parents then info.derivedClassInfo(declaredParents = parents1)
else tp
case _ => tp
// This is a lie, superAcc and synthMbr make changes, but if this is `true` the compiler crashes.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

[error] ## Exception when compiling 92 sources to /Users/solal/scala3/scaladoc/target/scala-3.11.0-RC1-bin-SNAPSHOT-nonbootstrapped/classes
[error] dotty.tools.dotc.core.UnpicklingError: Could not read definition method apply in /Users/solal/scala3/library/target/scala-library-bootstrapped/classes/scala/runtime/AbstractPartialFunction.tasty. Caused by the following exception:
[error] java.lang.AssertionError: assertion failed: Cyclic reference while unpickling definition at address 181 in unit <no file>

this does not sound fun to debug, and anyway compilingScala2StdLib was a constant false before so this isn't changing that

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants