mono/CppSharp

Inline friend-defined functions when the class is in a namespace

Opened this issue · 0 comments

namespace NS
{
    struct A
    {
        friend void foo(A) {}
    };
}

CppSharp chokes on this with `options.CheckSymbols = true;.

It generates the following line in the symbols file, which doesn't compile:

void foo(struct NS::A);
void (*_1)(struct NS::A) = &NS::foo;

Here foo should be declared in namespace NS, but gets declared in the global namespace.

This results in:

error: no member named 'foo' in namespace 'NS'