mirror of
https://github.com/apple/pkl.git
synced 2026-05-25 16:19:20 +02:00
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:
@@ -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
|
||||
Reference in New Issue
Block a user