On Friday, 1 January 2016 at 10:14:58 UTC, Shriramana Sharma wrote:
    auto p = TimeSpan(1, 2);
Error: no property 'opCall' for type '<src>.TimeSpan'

The error should be in 'auto p = ...', not in the line using the property.

Instantiate with 'new TimeSpan(1, 2)' instead of 'TimeSpan(1, 2)'. The latter would be the constructor call for a struct. Classes go on the GC'ed heap by default.

The property syntax should work. :-)

-- Simon

Reply via email to