forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix stale symbol errors connected to lazyvals
The actual stale symbol error, while recent, seems correct to me. There is no reason why an earlier phase (Mixins) should see denotation from a later phase (LazyVals) - if the opposite is true (like with the fix here) the bringForward method is able to recover with a NoDenotation, which is what we want.
- Loading branch information
Showing
3 changed files
with
14 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import scala.quoted.* | ||
|
||
trait Schema | ||
object Schema: | ||
lazy val sampleDate: String = "" // lazy val requried to reproduce | ||
|
||
inline def derived: Schema = | ||
annotations | ||
new Schema {} | ||
|
||
inline def annotations: Int = ${ annotationsImpl } | ||
def annotationsImpl(using Quotes): Expr[Int] = Expr(1) |
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 @@ | ||
val inputValueSchema = Schema.derived |