Commit 4bcad56
committed
Fix safe-init error in Trees.scala
Fixes the following safe-init error that occurs during bootstrapping:
```
[error] -- Error: /***********/dotty/compiler/src/dotty/tools/dotc/ast/Trees.scala:815:22
[error] 815 | assert(isEmpty || tpt != genericEmptyTree[T])
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |Call method ValDef.this.tpt.!=(dotty.tools.dotc.ast.Trees.genericEmptyTree[T]) on a value with an unknown initialization. Calling trace:
[error] |-> @sharable val theEmptyValDef = new EmptyValDef[Type]() [ Trees.scala:970 ]
[error] | ^^^^^^^^^^^^^^^^^^^^^^^
[error] |-> class EmptyValDef[T >: Untyped] extends ValDef[T]( [ Trees.scala:961 ]
[error] | ^
[error] |-> case class ValDef[-T >: Untyped] private[ast] (name: TermName, tpt: Tree[T], private var preRhs: LazyTree[T @uncheckedVariance])(implicit @constructorOnly src: SourceFile) [ Trees.scala:812 ]
[error] | ^
[error] |-> assert(isEmpty || tpt != genericEmptyTree[T]) [ Trees.scala:815 ]
[error] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[error] |-> if !assertion then scala.runtime.Scala3RunTime.assertFailed() [ Predef.scala:10 ]
```1 parent 924b58e commit 4bcad56
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
812 | 812 | | |
813 | 813 | | |
814 | 814 | | |
815 | | - | |
| 815 | + | |
816 | 816 | | |
817 | 817 | | |
818 | 818 | | |
| |||
822 | 822 | | |
823 | 823 | | |
824 | 824 | | |
825 | | - | |
| 825 | + | |
826 | 826 | | |
827 | 827 | | |
828 | 828 | | |
| |||
0 commit comments