Skip to content
Go to file
Cannot retrieve contributors at this time
21 lines (12 sloc) 455 Bytes
use v6;
use Test;
plan 2;
=begin pod
A class can only derive already declared classes.
=end pod
# L<S12/Classes/"bare class names must be predeclared">
# need eval-lives-ok here because class declarations happen at compile time
eval-lives-ok ' class A {}; class B is A {}; ', "base before derived: lives";
throws-like ' class D is C {}; class C {}; ', X::Inheritance::UnknownParent,
"derived before base: dies";
# vim: expandtab shiftwidth=4
You can’t perform that action at this time.