Merge: doc: fixed some typos and other misc. corrections
[nit.git] / tests / test_attr_easy.nit
1
2 class B
3 redef fun to_s do return "an instance of B"
4 end
5
6 class A
7 var a = true
8 var b = false
9 var c = 12345
10 var d = 1.2345
11 var e = "asdf"
12 var f = new B
13 var g = new HashMap[Int,B]
14
15 var h = true or false
16
17 redef fun to_s do return "{a} {b} {c} {d} {e} {h}\n" +
18 "{f}\n" +
19 "{a isa Bool} {b isa Bool} {c isa Int} {d isa Float}\n" +
20 "{e isa String} {f isa B} {not f isa A} {g isa HashMap[Int,B]}"
21 end
22
23 var a = new A
24 print a