We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
this
1 parent 62027b2 commit 09cfca5Copy full SHA for 09cfca5
source/sema.h
@@ -1237,7 +1237,13 @@ class sema
1237
&& n.parent_is_type()
1238
)
1239
{
1240
- assert(n.is_object());
+ if (!n.is_object()) {
1241
+ errors.emplace_back(
1242
+ n.position(),
1243
+ "a member named 'this' declares a base subobject, and must be followed by a base type name"
1244
+ );
1245
+ return false;
1246
+ }
1247
1248
if (
1249
!n.is_public()
0 commit comments