microsoft / Power-Fx

Power Fx low-code programming language
MIT License
3.15k stars 309 forks source link

Fix NullReferenceException on new IsOptionSetBackedByXXX properties #2497

Closed CarlosFigueiraMSFT closed 1 week ago

CarlosFigueiraMSFT commented 1 week ago

Noticed from telemetry some NullReferenceException errors in those new properties. Adding guard to fix it.

Shpakh-MSFT commented 1 week ago
            var typeSuffix = string.IsNullOrEmpty(OptionSetInfo?.EntityName) ? string.Empty : $" ({OptionSetInfo.EntityName})";

Here as well?


Refers to: src/libraries/Microsoft.PowerFx.Core/Types/DType.cs:1012 in 06637c1. [](commit_id = 06637c16d0371fa30a31d45db772d892a522fa82, deletion_comment = False)