Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 22 lines (15 sloc) 0.549 kB
ebc0a2c [t/spec]
moritz authored
1 use v6;
2
3 use Test;
e821907 [gsoc_spectest] more TASKS and tests for class methods with inheritan…
Auzon authored
4 plan 5;
ebc0a2c [t/spec]
moritz authored
5
6 # L<S12/Class methods/>
7
e821907 [gsoc_spectest] more TASKS and tests for class methods with inheritan…
Auzon authored
8 class C {method h {42}}
6ec3bc6 [inheritance-class-methods.t] changed around the order of class decla…
masak authored
9 class B is C { method g { self.f } };
10 class A is B { method f {1; } };
ebc0a2c [t/spec]
moritz authored
11
e821907 [gsoc_spectest] more TASKS and tests for class methods with inheritan…
Auzon authored
12 class AA {method i {108}}
13 class D is A is AA {method f {2} }
ebc0a2c [t/spec]
moritz authored
14
e821907 [gsoc_spectest] more TASKS and tests for class methods with inheritan…
Auzon authored
15 is(A.g(), 1, 'inheritance works on class methods');
16 is(A.h(), 42, '>1 level deep inheritance works on class methods');
17 is(D.h(), 42, 'multiple inheritance works on class methods (1)');
18 is(D.i(), 108, 'multiple inheritance works on class methods (2)');
19 is(D.f(), 2, 'method from class is selected over inherited method');
7f29bc5 [t/spec] Add vim: lines everywhere.
kyle authored
20
21 # vim: ft=perl6
Something went wrong with that request. Please try again.