cppfront
cppfront copied to clipboard
[BUG] Non-object declaration before `this` member ICEs
trafficstars
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:
Thanks!
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: () = {}