tsu icon indicating copy to clipboard operation
tsu copied to clipboard

Reference parameters are treated as output parameters

Open mihe opened this issue 5 years ago • 0 comments

Parameters with the UPARAM(ref) annotation currently gets treated as an output parameter, which results in some janky typings, like:

declare class Vector2D {
    normalize(tolerance?: number): { a: Vector2D };
}

It should instead perform the operation in-place and not return anything.

Some preliminary tests with simply excluding CPF_ReferenceParm from FTsuReflection::IsOutputParameter didn't seem to work. The actual invocation probably needs to not copy the value if it's a reference parameter or something.

mihe avatar Apr 24 '19 12:04 mihe