struct Test { int i; alias i this; } auto testFunct( Test i){ }
void main() { Test t; t = 1; testFunct( 1); } The assignment is fine, but the call is rejected by dmd. See also http://forum.dlang.org/post/fqfonkcdcjuwbaacq...@forum.dlang.org
Carl Sturtivant via Digitalmars-d Mon, 22 Feb 2016 09:27:13 -0800
struct Test { int i; alias i this; } auto testFunct( Test i){ }
void main() { Test t; t = 1; testFunct( 1); } The assignment is fine, but the call is rejected by dmd. See also http://forum.dlang.org/post/fqfonkcdcjuwbaacq...@forum.dlang.org