Closed tomFlowee closed 8 months ago
This is the constructor syntax:
Digger: type = {
operator=: (out this) = {
}
}
That code looks like a base member declaration, but it has ()
instead of a name. It results in this error:
cppfront: source/sema.h:1240: bool cpp2::sema::check(const cpp2::declaration_node&): Assertion `n.is_object()' failed.
I guess the assert should be changed to an error.
Thanks!
Describe the bug
Calling cppfront Digger.cpp2 results in a segfault and an empty cpp file.
To Reproduce Steps to reproduce the behavior:
Digger.cpp2
cppfront Digger.cpp2
I'm probably doing it wrong (wanted to initialize class members there), but I think it should not crash.