You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a test file with two typedefs, one using object notation and one using class notation. When parsing that file the resulting data is inconsistent in retaining information about optional fields depending on which notation was used. Object notation works fine, class notation is misbehaving.
The parse data for TestA contains the expected :optional metadata for the optional fields, and their respective types come down to Null<X> which was a bit surprising for me at that moment but is still fine.
However, the parse data for TestB::bar does not contain any information about it being optional (no typing as Null<Int>, no :optional entry in meta), which afaics makes it impossible to know whether that field was optional or not. Additionally, TestB::baz is not the same type as TestA::baz (Bool vs Null<Bool>) despite carrying the :optional metadata.
Using the ? to indicate optional fields should be valid in class notation according to the documentation.
Expected result
Information about fields being optional should be retained regardless of notation used. Also, the data should follow a consistent pattern: if optional fields are typed as Null<X> in one notation then they should also be typed as such when using the other notation.
The text was updated successfully, but these errors were encountered:
Description
I have a test file with two typedefs, one using object notation and one using class notation. When parsing that file the resulting data is inconsistent in retaining information about optional fields depending on which notation was used. Object notation works fine, class notation is misbehaving.
Current result
TestA gets parsed as (code snippet under fold)
TestB gets parsed as (code snippet under fold)
The parse data for
TestA
contains the expected:optional
metadata for the optional fields, and their respective types come down toNull<X>
which was a bit surprising for me at that moment but is still fine.However, the parse data for
TestB::bar
does not contain any information about it being optional (no typing asNull<Int>
, no:optional
entry inmeta
), which afaics makes it impossible to know whether that field was optional or not. Additionally,TestB::baz
is not the same type asTestA::baz
(Bool
vsNull<Bool>
) despite carrying the:optional
metadata.Using the
?
to indicate optional fields should be valid in class notation according to the documentation.Expected result
Information about fields being optional should be retained regardless of notation used. Also, the data should follow a consistent pattern: if optional fields are typed as
Null<X>
in one notation then they should also be typed as such when using the other notation.The text was updated successfully, but these errors were encountered: