Error in assignment to 'this' inside constructor

TommiT tommitissari at hotmail.com
Sun May 12 00:51:38 PDT 2013


On Sunday, 12 May 2013 at 03:32:44 UTC, evilrat wrote:
> what? structs has value semantics, every time you assign a 
> struct to variable it assign its copy.
>
> you also don't have to have constructor for structs, it 
> initializes it fields in left-to-right order or so.
>
> [..]

Yes, I know that. But I'm not trying to write a struct such as 
'Test' in my example above. 'Test' is just the simplest example I 
could make in order to showcase the (assumed) compiler bug. The 
struct that I *am* trying to make does indeed need a constructor 
and it's a very complex one and I do need a way to assign 
different compile-time-constant values of that struct type over 
'this' inside the constructor.

Anyway, if no-one tells me otherwise, I'll just assume it's a 
compiler bug and make a bug-report about it.


More information about the Digitalmars-d-learn mailing list