-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix uninitializing fields when evaluating a cached constructor call i…
…n global initialization checker (#21403) This PR fixes the accessing uninitialized field errors given by the global initialization checker, where fields are uninitialized when evaluating a cached constructor call during the analysis.
- Loading branch information
Showing
2 changed files
with
12 additions
and
2 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,8 @@ | ||
class Bar: | ||
var f: Int = 0 | ||
|
||
object A: | ||
val b1 = new Bar() | ||
val b2 = new Bar() | ||
val b3 = new Bar() | ||
b3.f = 1 |