www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 24160] New: extern(objective-c) ivars don't respect initializer

https://issues.dlang.org/show_bug.cgi?id=24160

          Issue ID: 24160
           Summary: extern(objective-c) ivars don't respect initializer
           Product: D
           Version: D2
          Hardware: All
                OS: Mac OS X
            Status: NEW
          Severity: minor
          Priority: P4
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: destructionator gmail.com

I made an extern objc class with a member var and after alloc/init it was not
what it was set to.

class thing {
   auto item = 4;
}

item not 4. I suspect it is because the extern objc alloc/init things don't
know about D's initializer. Easy to make your own init that does it though.

--
Sep 25 2023