Skip to content

Commit

Permalink
Fix Issue 5299 - Protected inheritance is semantically undefined
Browse files Browse the repository at this point in the history
Deprecation -> Error
  • Loading branch information
yebblies committed Aug 29, 2014
1 parent 1f9abd5 commit 5ffc7d3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/parse.c
Expand Up @@ -2172,7 +2172,7 @@ BaseClasses *Parser::parseBaseClasses()
default: break;
}
if (prot)
deprecation("use of base class protection is deprecated");
error("use of base class protection is no longer supported");
BaseClass *b = new BaseClass(parseBasicType(), protection);
baseclasses->push(b);
if (token.value != TOKcomma)
Expand Down
14 changes: 14 additions & 0 deletions test/fail_compilation/fail5299.d
@@ -0,0 +1,14 @@
/*
TEST_OUTPUT:
---
fail_compilation/fail5299.d(12): Error: use of base class protection is no longer supported
---
*/

class A
{
}

class B : private A
{
}

0 comments on commit 5ffc7d3

Please sign in to comment.