-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Move struct param tests to a dedicated file #5539
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
… `struct_definition_return_type.h` and not `struct_decl_return_type.h`
…on for moving tests
…move them from `function.carbon`
|
||
auto foo(S) -> void; | ||
|
||
// --- fail_todo_import_struct_decl_param_type.carbon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
S
is going to need to be complete for a call to foo() to happen, if S
is passed by value, so this is never going to pass as written, right?
https://godbolt.org/z/x3e5ao9Y9
auto foo(S*) -> void
could pass though. Do you want to write it that way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
struct F; | ||
|
||
F foo(); | ||
|
||
// --- fail_todo_import_struct_return_type.carbon | ||
// --- fail_todo_import_struct_decl_return_type.carbon |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to above, calling foo() will not ever pass if F
is not complete: https://godbolt.org/z/hn5WroTTP
Do you want to change it to auto foo() -> F*
or..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// ============================================================================ | ||
|
||
// --- struct_return_type.h | ||
// --- struct_decl_return_type.h | ||
|
||
struct F; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this can be struct S
to not confuse things with fn F
in the next file split
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in stages for easier review, see commits.
Based on #5537.
Part of #5533.