UFCS confusion

Michael michael at toohuman.io
Fri Jul 13 10:21:54 UTC 2018


Hello,

I am nesting some function calls, and I'm pretty used to making 
use of D's Uniform Function Call Syntax, but I'm getting an error 
if I try to convert this line:

> createSet(createVector(langSize, index)).length;

which works, into this line:

> createVector(langSize, index).createSet.length;

receiving the error "Error: no property createSet for type 
int[]", when the signature for createSet is:

> static auto createSet(in int[] vector) pure

What am I missing here? I'm sure it's stupidly obvious but it 
expects one argument, so I'm just calling it without parentheses.


More information about the Digitalmars-d-learn mailing list