cppfront icon indicating copy to clipboard operation
cppfront copied to clipboard

[BUG] Lifetime safety guards fail through pointers

Open ShalokShalom opened this issue 9 months ago • 0 comments

Describe the bug

It seems like the pointers creating a memory issues here.

To Reproduce

main: () -> int = {
    y: * int;
    {
        x := unique.new<int>(10);
        y = x*&;
    }
    std::cout << y* ;
}

Compiled with Clang and pure Cpp2.

Image

ShalokShalom avatar Apr 03 '25 08:04 ShalokShalom