www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 17297] New: Object.~this not being nogc is severely limiting


          Issue ID: 17297
           Summary: Object.~this not being  nogc is severely limiting
                     nogc applicability
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: aliloko gmail.com

destroy() infers it's " nogc"-ness from rt_finalize which is not nothrow
and not  nogc:

I guess the rationale is that rt_finalize call Object.~this() and that
may GC allocate, and throw.

In turn this cause every wrapper using emplace+destroy to not be  nogc.

Current programs which run without the runtime must currently break the type
system in order to call destroy() anyway.


Apr 04 2017