Having a code like this: ```csharp public class Price{ public decimal Amount { get; set; } } public Product{ public Price? Price { get; set; } [Projectable(AllowBlockBody = true, NullConditionalRewriteSupport = NullConditionalRewriteSupport.Ignore)] public decimal GetCost(){ return Price?.Amount ?? 0m; } } ``` Which gets compiled to this: ```csharp ... public decimal ...Product_GetCost(){ return Price.Amount ?? 0m; } ... ``` Which triggers the compilation error: ``` CS0019 - Operator '??' cannot be applied to operands of type 'decimal' and 'decimal' ``` In this case it should get cast to the Nullable type (`decimal?`).
Activity
Xriuk commentedon May 28, 2026
Adding a manual cast seems to solve the issue for now, however this should be handled by the generator I guess: