Uh oh!
There was an error while loading. Please reload this page.
Don't print the declaring type for RQA union cases - #10083
Conversation
abelbraaksma
commented
Sep 6, 2020
Now that this is considered a regression, I propose to merge this into the VS 16.7.x branch as well and not just into future branches, since otherwise we may keep seeing reports on this cropping up until long term support is over. |
We'll see if there are reports. We generally avoid servicing unless it is absolutely necessary, and VS telemetry shows that users overwhelmingly update instead of stay on older versions, even if it's technically marked LTS. |
dsyme
commented
Sep 7, 2020
I think we should be more nuanced here
Technically separating 1/2 from 3 is simple. Separating 1 from 2/3 is a little harder (it needs another flag passed through to printf in the format string, the only way to plumb such flags through). |
cartermp
commented
Sep 7, 2020
I'd be fine with that I suppose. Note that the same nuance should probably apply for enums, especially when you consider that they need to be fully qualified anyways. Though that gets even more tricky if you consider |
Note that enum values, other than DU cases, have a clear string representation: the case name only. In FSI, they are currently represented in the default output a little bit different than other types, but in regular programming with >typeMyEnum= One =1| Two =2;;typeMyEnum=| One =1| Two =2> MyEnum.One;;valit:MyEnum =One {value__ = 1;}> string MyEnum.One;;valit:string = "One"
> sprintf "%A" MyEnum.One;;valit:string = "One"And with >open typeMyEnum;;
> One;;valit:MyEnum =One {value__ = 1;}> MyEnum.One;;valit:MyEnum =One {value__ = 1;} |
cartermp
commented
Sep 14, 2020
@dsyme I think we can tweak that later. But right now I just want to get this in so that we don't ship the regression by release. |
dsyme
commented
Sep 14, 2020
ok |
fixes#9357
Unfortunately, both
%Aand%sdo the same thing for union cases, so if anyone is relying on stringifying a union case for anything they can't switch to a "better" way unless they overrideToString().Ideally people would not rely on this, since the prupose of this functionality is to provide structured plaintext output in tools. But the reality is that it is being used for more than that.