Closed bernardnormier closed 1 year ago
Probably related to #470.
I suspect a difficulty is E032 needs to be split:
src\diagnostics\errors.rs
460: "E032",
461- OptionalsNotSupported,
462- format!("optional types are not supported by the {encoding} encoding (except for classes, proxies, and with tags)"),
463- encoding
Let's look at different contexts for this error:
BTW the existing message is also incorrect since customs can be optional with Slice1 without tag. But if you typed a valid type, like int32?
, it's odd to tell you "I see you want an optional type, you're sure you don't want to use another type?".
This is what happens when you give an optional type to a class field:
This is obviously not correct. You're writing a class, in an encoding = Slice1 file. The correct suggestion is to add a tag, not change the encoding.