Description
Having this: Base
prevents type with some @meta from compiling
Reproduce Code
EmptyBase: type = {}
BaseBV: @basic_value type = {}
BV_BV: @basic_value type = { this: BaseBV; } //error
BV_B: @basic_value type = { this: EmptyBase; } //error
I_B: @interface type = { this: EmptyBase; } //error
https://cpp2.godbolt.org/z/Y5sY4a39G
Version
latest (38aec57)
Command lines
cppfront/cppfront $1.cpp2 -p
clang++-15 -Icppfront/include $1.cpp -std=c++20 -o $1
Expected result
Successful compilation or clearer diagnostic if that's intended
Actual result
@basic_value or @value or @struct:
error: expected 'BaseBV = ...' initialization statement - an operator= body must start with a series of 'member = value;'
@interface:
error: while applying @interface - interfaces may not contain data objects
Additional context
This is specifically about what seems as valid combinations, like @interface::@interface
I'm not talking about impossible combinations, like @polymorphic_base::@copyable
, that could be another issue.
Which actually compiles, giving cpp1 warning about