| | 1 | /* |
| | 2 | * Test of multiple inheritance and templates - based on a bug report |
| | 3 | * from Eric Eve. |
| | 4 | */ |
| | 5 | |
| | 6 | class TestA : object |
| | 7 | weight = 0 |
| | 8 | colour = nil |
| | 9 | mydesc = nil |
| | 10 | ; |
| | 11 | |
| | 12 | class TestB : object |
| | 13 | bulk = 0 |
| | 14 | texture = nil |
| | 15 | ; |
| | 16 | |
| | 17 | class TestC : TestB, TestA |
| | 18 | shape = nil |
| | 19 | ; |
| | 20 | |
| | 21 | TestB template +bulk 'texture'; |
| | 22 | TestA template +weight 'colour' 'mydesc'?; |
| | 23 | |
| | 24 | TestC template inherited 'shape'; |
| | 25 | |
| | 26 | testMe : TestC +20 'rough' ; |
| | 27 | |
| | 28 | testMeAgain : TestC +30 'red' 'wooden'; |
| | 29 | |
| | 30 | testMeShape : TestC +10 'blue' 'large' 'square'; |
| | 31 | |
| | 32 | main(args) |
| | 33 | { |
| | 34 | "Hello, world!\n"; |
| | 35 | } |