Fix code typos for C.145

Also added the "extends B" to D
This commit is contained in:
ven 2015-09-20 14:19:27 +02:00
parent 5452b119c5
commit e2a9591a48

View File

@ -5013,8 +5013,8 @@ and such interfaces are often not easily or naturally organized into a single-ro
**Example**:
struct B { int a; virtual f(); };
struct D { int b; override f(); };
struct B { int a; virtual int f(); };
struct D : B { int b; int f() override; };
void use(B b)
{
@ -5026,7 +5026,7 @@ and such interfaces are often not easily or naturally organized into a single-ro
void use2()
{
D d;
use(b); // slice
use(d); // slice
}
Both `d`s are sliced.