]> gitweb.ps.run Git - toc/blobdiff - test/test2.toc
structs and functions in ctx
[toc] / test / test2.toc
index 6e8d4f885b2363c99dba37751829a4f56c0fa772..abd6bc77ea9874eef8ecd6fc27f32402c5d392f7 100644 (file)
@@ -13,6 +13,7 @@ namespace N1 {
       m1(i: int) : int {\r
         this->i3 = this->i1 * this->i2;\r
 \r
+        f1();\r
         N1::f1();\r
 \r
         return this->i1 + this->i2;\r
@@ -21,6 +22,7 @@ namespace N1 {
 \r
     func f1() : void {\r
       var s1 : N1::N2::S1;\r
+\r
       s1.m1(123);\r
     }\r
   }\r
@@ -35,6 +37,11 @@ struct S1<T> {
   }\r
 }\r
 \r
+struct S2 {\r
+  abc(): S2 { }\r
+  xyz(): S2 { }\r
+}\r
+\r
 func generic1<A>(a1 : A, a2 : A) : A {\r
   return a1 + a2;\r
 }\r
@@ -57,5 +64,8 @@ func main(argc : int, argv : char**) : int {
   generic1<int>(1, 2);\r
   generic1<double>(3.4, 5.6);\r
 \r
+  var s: S2;\r
+  s.abc().xyz();\r
+\r
   return 0;\r
 }
\ No newline at end of file