Beta problems... 'this' pointer in union?
    Era Scarecrow 
    rtcvb32 at yahoo.com
       
    Sat Dec 29 19:33:54 PST 2012
    
    
  
On Saturday, 29 December 2012 at 23:58:49 UTC, Jonathan M Davis 
wrote:
> That would be your problem. It's not fixed in 2.060. It was 
> fixed since then. Use the latest from git or the current beta.
  Hmm alright, I've installed the beta. New problems are creeping 
up curiously enough. There seems to be an invisibly added pointer 
'this', which then makes a union break while using bitfields. 
This didn't break before...
  Unless I use the traits it doesn't show the problem. Any 
thoughts?
[code]
   static assert(__traits(compiles, {
     union xxx {
     int i;
     mixin("int geti() @safe const nothrow pure {return i;}void 
seti(int ii) @safe pure nothrow {i = ii;}");
     }
   }));
[/code]
output:
test.d(??): Error: static assert  (__traits(compiles,delegate 
pure nothrow @safe
  void()
{
union xxx
{
int i;
mixin("int geti() @safe const nothrow pure {return i;}void 
seti(int ii) @safe pu
re nothrow {i = ii;}");
void* this;
}
}
)) is false
    
    
More information about the Digitalmars-d-learn
mailing list