-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a phase for recomputing and rechecking all types in a typed Scala…
… program. This is useful for two reasons: = It gives us additional explanation and validation what constitutes a well-typed Scala 3 program. Recheck has less than 300 lines of code, which is a lot less than Typer and associated files. - It can be used as a basis for phases that refine the original types with new kinds of types and new rules.
- Loading branch information
Showing
13 changed files
with
427 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package dotty.tools.dotc | ||
package transform | ||
|
||
import core.Phases.Phase | ||
import core.DenotTransformers.IdentityDenotTransformer | ||
import core.Contexts.{Context, ctx} | ||
|
||
/** A phase that precedes the rechecker and that allows installing | ||
* new types for local symbols. | ||
*/ | ||
class PreRecheck extends Phase, IdentityDenotTransformer: | ||
|
||
def phaseName: String = "preRecheck" | ||
|
||
override def isEnabled(using Context) = next.isEnabled | ||
|
||
override def changesBaseTypes: Boolean = true | ||
|
||
def run(using Context): Unit = () | ||
|
||
override def isCheckable = false |
Oops, something went wrong.