Fix default value for non-final module type (#1392)

This fixes an issue where the `module` type produces the wrong default
value.

Closes #1391
This commit is contained in:
Daniel Chao
2026-01-05 11:39:24 -08:00
committed by GitHub
parent 0a4281366f
commit 8f83885c75
14 changed files with 245 additions and 121 deletions
@@ -0,0 +1,20 @@
open module Foo
prop: String
myself: module?
class Bar extends module {
prop2: Int
}
output {
value = new Bar {
prop = "hi"
prop2 = 15
myself {
prop = "hi again"
prop2 = 15
}
}
}
@@ -0,0 +1,7 @@
prop = "hi"
myself {
prop = "hi again"
myself = null
prop2 = 15
}
prop2 = 15