No property error message

Steven Schveighoffer via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Mar 21 10:50:22 PDT 2016


On 3/19/16 2:36 PM, ric maicle wrote:
> I got an error message with the following code saying:
>
>    Error: no property 'length' for type 'int[string]'
>
> Shouldn't the error message say 'length()'?

No, it should say length is a property, not a function. a.length should 
work.

Note the error message here:

struct S
{
     int x;
}
void main()
{
     S s;
     s.x();
}

function expected before (), not s.x of type int

Please file a bug report.

-Steve


More information about the Digitalmars-d-learn mailing list