[BUG] virtual function with multiple return values errors out if no body is defined
Describe the bug As title says, I would expect this to work, and you'd later do the full definition (which I guess should reuse the same "inline struct" under the hood?). I understand that multiple return values support is incomplete, and that generally, these kind of functions must have a body, but even the returned error seems unrelated/confusing.
To Reproduce Steps to reproduce the behavior:
- Sample code
my_i: @interface type =
{
query_declared_value_set_functions: (this) -> (
out_this_in_that: bool,
out_this_move_that: bool,
inout_this_in_that: bool,
inout_this_move_that: bool,
);
}
(Note: you don't strictly need the @interface metafunction)
-
Command lines including which C++ compiler you are using N/A -- happens on every setting.
-
Expected result - what you expected to happen I'd expect this to simply compile (or give a different error if not technically feasible yet).
-
Actual result/error Weird error (the function has no body, why is it mentioning initialization):
test.cpp2(7,13): error: local variable inout_this_move_that is used before it was initialized
==> program violates initialization safety guarantee - see previous errors
Additional context Keen eyes may have noticed that the function signature used is part of the current Reflection API, I am currently messing around with it as part of my work on user defined metafunctions. (finally have more time to dedicate to it 😃 )