Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / base_types_formal_and_virtual4.nit
1 # This file is part of NIT ( http://www.nitlanguage.org ).
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 import end
16
17 interface Object
18 end
19
20 class A[E: Object]
21 fun e: E is abstract
22 end
23
24 class C[G: Object]
25 type V: A[G]
26 fun v: V is abstract
27 fun test
28 do
29 __debug__ type V : v
30 __debug__ type G : v.e
31 end
32 end
33
34 class B[F: A[X]]
35 fun f: F is abstract
36 fun test
37 do
38 __debug__ type F : f
39 __debug__ type X : f.e
40 end
41 end
42
43 class X
44 end