parent
0e732f1d43
commit
cafb594179
@ -848,6 +848,7 @@ class Field:
|
||||
constexpr: bool = False
|
||||
mutable: bool = False
|
||||
static: bool = False
|
||||
inline: bool = False
|
||||
|
||||
doxygen: typing.Optional[str] = None
|
||||
|
||||
|
@ -3336,3 +3336,40 @@ def test_constructor_outside_class() -> None:
|
||||
]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
def test_class_inline_static() -> None:
|
||||
content = """
|
||||
struct X {
|
||||
inline static bool Foo = 1;
|
||||
};
|
||||
"""
|
||||
data = parse_string(content, cleandoc=True)
|
||||
|
||||
assert data == ParsedData(
|
||||
namespace=NamespaceScope(
|
||||
classes=[
|
||||
ClassScope(
|
||||
class_decl=ClassDecl(
|
||||
typename=PQName(
|
||||
segments=[NameSpecifier(name="X")], classkey="struct"
|
||||
)
|
||||
),
|
||||
fields=[
|
||||
Field(
|
||||
access="public",
|
||||
type=Type(
|
||||
typename=PQName(
|
||||
segments=[FundamentalSpecifier(name="bool")]
|
||||
)
|
||||
),
|
||||
name="Foo",
|
||||
value=Value(tokens=[Token(value="1")]),
|
||||
static=True,
|
||||
inline=True,
|
||||
)
|
||||
],
|
||||
)
|
||||
]
|
||||
)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user