Water and the => operator


(Thom Halvorsen) #1

In VS2017 I can write a read only property like this:

public string CustNm => License.TryGetValue(“CustNm”, out var value) ? value : string.Empty;

In Water this causes a compiler error:

E: Internal error: System.NullReferenceException: Object reference not set to an instance of an object.

This works:

public string CustNm
{
get
{
return License.TryGetValue(“CustNm”, out var value) ? value : string.Empty;
}
}

// Thom


(RemObjects) #2

Thanks, logged as bugs://81580


(RemObjects) #3

bugs://81580 got closed with status fixed.