Allow setting a field with partially defined field (#646)

* allow setting a field with partially defined field

* actually run the test
This commit is contained in:
water111
2021-06-28 19:20:36 -04:00
committed by GitHub
parent 385b8b5785
commit 2ee48e08f3
5 changed files with 43 additions and 6 deletions
@@ -0,0 +1,10 @@
(declare-type fake-type basic)
(deftype type-containing-fake-type (basic)
((field fake-type))
)
(let ((obj (new 'stack 'type-containing-fake-type)))
(-> obj field)
(set! (-> obj field) (the fake-type #f))
(format #t "~A~%" (-> obj field))
)
+6
View File
@@ -545,6 +545,12 @@ TEST_F(WithGameTests, InlinedPackedBasics) {
"0\n"});
}
TEST_F(WithGameTests, PartialDefineTypeField) {
runner.run_static_test(env, testCategory, "test-partial-define-type-field.gc",
{"#f\n"
"0\n"});
}
// VECTOR FLOAT TESTS
// ---- One off Tests