Commit 41d7c98
committed
Reposition assertion to respect safe initialization
Passing `this` to `assert` before object members are fully initialized
does not pass safe init check:
```
[error] -- Error: library/src/scala/runtime/stdLibPatches/Predef.scala:7:64 ------------
[error] 7 | if !assertion then scala.runtime.Scala3RunTime.assertFailed(message)
[error] | ^^^^^^^
[error] |Cannot prove that the value is fully initialized. Only initialized values may be used as arguments.
```
This change fixes the above error.
Review by @liufengyun1 parent ddac928 commit 41d7c98
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3877 | 3877 | | |
3878 | 3878 | | |
3879 | 3879 | | |
3880 | | - | |
3881 | | - | |
3882 | | - | |
3883 | 3880 | | |
3884 | 3881 | | |
3885 | 3882 | | |
| |||
3931 | 3928 | | |
3932 | 3929 | | |
3933 | 3930 | | |
| 3931 | + | |
| 3932 | + | |
| 3933 | + | |
3934 | 3934 | | |
3935 | 3935 | | |
3936 | 3936 | | |
| |||
0 commit comments