Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / base_gen_bound.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
21 end
22
23 class B
24 super A
25 end
26
27 class G[E:B]
28 end
29
30 class H[F:A]
31 #alt1 super G[F]
32 #alt2 var a: G[F]
33 #alt3 fun b: G[F] is abstract
34 #alt4 fun c(x: G[F]) is abstract
35 end
36
37 class I
38 type V: A
39 #alt5 var a: G[V]
40 #alt6 fun b: G[V] is abstract
41 #alt7 fun c(x: G[V]) is abstract
42 end
43
44 #alt8 class J[FF:G[A]]
45 #alt8 end
46
47 var a = new A
48 var b = new B
49 #alt9 var ga = new G[A]
50 var gb = new G[B]
51 var ha = new H[A]
52 var hb = new H[B]
53 var i = new I