Skip to content
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

[BUG] Non-object declaration before this member ICEs #830

Open
JohelEGP opened this issue Nov 15, 2023 · 2 comments
Open

[BUG] Non-object declaration before this member ICEs #830

JohelEGP opened this issue Nov 15, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@JohelEGP
Copy link
Contributor

Title: Non-object declaration before this member ICEs.

Minimal reproducer (https://cpp2.godbolt.org/z/Kdbz8h311):

my_time: type = {
  rep: type == cpp2::longdouble;
  this: duration;
}
main: () = { }
Commands:
cppfront main.cpp2
clang++18 -std=c++23 -stdlib=libc++ -lc++abi -pedantic-errors -Wall -Wextra -Wconversion -Werror=unused-result -I . main.cpp

Expected result: A well-formed program.

Actual result and error: Segmentation fault (core dumped).

See also:

@JohelEGP JohelEGP added the bug Something isn't working label Nov 15, 2023
@hsutter
Copy link
Owner

hsutter commented Nov 15, 2023

Thanks!

@JohelEGP
Copy link
Contributor Author

Thank you.
But it's not just aliases.
It's all non-object declarations.
So now it works for using statements and alias declarations.
This one still segfaults:

my_time: type = {
  f: () 0;
  this: duration;
}
main: () = {}

@hsutter hsutter reopened this Nov 20, 2023
zaucy pushed a commit to zaucy/cppfront that referenced this issue Dec 5, 2023
And do a round of output formatting cleanup (high diffs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants