-fun void test(<~int~>Ptr p) {
+fun void test(Ptr<~int~> p) {
<<< *p >>>;
}
var int i => test;
class D extends C {
}
var D d;
-d :=> var <~C~>Ptr pd;
+d :=> var Ptr<~C~> pd;
12 => var int i;
-<<<i $ <~int~>Ptr >>>;
+<<<i $ Ptr<~int~> >>>;
var int i;
-i :=> var <~int~>Ptr pti;
+i :=> var Ptr<~int~> pti;
<<<12 => *pti, " ", *pti>>>;
#! [contains] EmptyPointerException
-var <~int~>Ptr t;
+var Ptr<~int~> t;
<<< *t >>>;
#! [contains] invalid pointer cast
-<<< 1 $ <~Object~>Ptr >>>;
+<<< 1 $ Ptr<~Object~> >>>;
-1 :=> var <~int~>Ptr pd;
+1 :=> var Ptr<~int~> pd;
class D extends C {}
var D d;
-d :=> var <~int~>Ptr pd;
+d :=> var Ptr<~int~> pd;
-1 :=> var <~int~>Ptr i;
+1 :=> var Ptr<~int~> i;
#! [contains] can't cast non-mutable value to Ptr
-fun void test(<~int~>Ptr i) { <<< *i>>>; }
+fun void test(Ptr<~int~> i) { <<< *i>>>; }
1 => test;
#! [contains] you must provide template types
-class<~A~> C {
+class C<~A~> {
var A a;
}
fun void test<~A~>() {}
}
var C c;
-#!c.test<~int~>();
c.test<~int~>(2.3);
c.test<~int~>(2.3, 2.3);
#! [contains] is not template
-var <~int~>Object o;
+var Object<~int~> o;
#! [contains] pre-defined types
typedef void t_ptr<~A~>();
-var <~int~>t_ptr iptr;
+var t_ptr<~int~> iptr;
fun void test<~A~>() {
var A a;
}
test @=> iptr;
-#!<<< iptr<~int~>() >>>;
<<< iptr() >>>;
<<< iptr<~int~>() >>>;
<<< iptr<~float~>() >>>;
#! [contains] pre-defined types
typedef void t_ptr<~A~>();
-typedef <~int~>t_ptr B;
+typedef t_ptr<~int~> B;
fun void test<~A~>() {
<<< __func__ >>>;
}
test @=> var B b;
-#!<<< iptr<~int~>() >>>;
<<< b() >>>;
<<< b<~int~>() >>>;
-#! fork me.id() @=> auto ref sh;
fun int test() {
return 12;
}
-fork test() @=> ref <~int~>TypedFork sh;
+fork test() @=> ref TypedFork<~int~> sh;
<<< typeof(sh) >>>;
sh.ev => now;
<<< sh.retval >>>;
-#!class child {}
-#!template<~A, B~>
-#!class C{ A key; B value; }
-#!<~int, int~>C c1;
-#!<float, float>C c2;
-#!<<< c1 >>>;
-#!<<< c2 >>>;
-#!<<< c2.value >>>;
-
-var <~int, int~>ClassTemplate ct;
+var ClassTemplate<~int, int~> ct;
<<< ct.key >>>;
-#!<float, float>ClassTemplate ct2;
-#!<<< ct2.key >>>;
-#!<child, float>ClassTemplate ct3;
-#!<<< ct3.key >>>;
-var <~int, float~>Map pp;
+var Map<~int, float~> pp;
<<< pp >>>;
<<< pp.size() >>>;
<<< pp.set(1, 2) >>>;
-<<< var <~Event~>U u>>>;
+<<< var U<~Event~> u>>>;
<<< u.a >>>;
-class <~A~>C {
+class C<~A~> {
operator @dtor void () { <<< __func__ >>>; }
}
-class <~A~>D extends <~A~>C {
+class D<~A~> extends C<~A~> {
operator @dtor void () { <<< __func__ >>>; }
}
-class E extends <~int~>D {
+class E extends D<~int~> {
operator @dtor void () { <<< __func__ >>>; }
}
-union <~A~>U {
+union U<~A~> {
A a;
int i;
};
-#!<~float~>U u;
-#!<<< u.i >>>;
-class <~A~>C extends <~A~>U {
+class C<~A~> extends U<~A~> {
fun void test() { <<< this >>>; }
operator @dtor void () { <<< __func__ >>>; }
}
-var <~float~>C c;
+var C<~float~> c;
<<< c >>>;
<<< c.test() >>>;
<<< c.i >>>;
-class <~A,B~>D extends <~float~>C {
+class D<~A,B~> extends C<~float~> {
}
-var <~int,int~>D d;
-class <~A,B~>E extends <~float,B~>D {
+var D<~int,int~> d;
+class E<~A,B~> extends D<~float,B~> {
}
-var <~int,int~>E e;
+var E<~int,int~> e;
class B {
}
-class <~A~> C extends B {
+class C<~A~> extends B {
}
-class <~A,B~> D extends <~A~>C {
- class <~A~>Child {
+class D<~A,B~> extends C<~A~> {
+ class Child<~A~> {
var A a;
}
- var <~A~>Child child;
+ var Child<~A~> child;
}
-var <~int~>D d;
+var D<~int~> d;
-class <~A~>Parent {
- class <~B~>C {
+class Parent<~A~> {
+ class C<~B~> {
12 => var A a;
13 => var B B;
}
}
-var <~int, int~>Parent.C c;
+var Parent.C<~int, int~> c;
<<< c.a >>>;
-class <~A~>C {
+class C<~A~> {
typedef static void func_t<~A~>(A a);
fun static void myfunc<~A~>(A a) { <<< a >>>; }
myfunc @=> var static func_t ptr;
ptr(1);
}
-var <~int~>C c;
+var C<~int~> c;
class C {
typedef void t_ptr<~A~>();
- var <~int~>t_ptr iptr;
+ var t_ptr<~int~> iptr;
fun void test<~A~>() {
<<< this, " ", __func__ >>>;
class C {
typedef static void t_ptr<~A~>();
- var <~int~>t_ptr iptr;
+ var t_ptr<~int~> iptr;
fun static void test<~A~>() {
<<< __func__ >>>;
typedef void ptr_t<~A~>(myPtr ptr);
-var <~ <~A~> Ptr~>ptr_t t;
+var ptr_t<~ Ptr<~A~> ~> t;
class B {}
-class<~A~>C extends B{}
+class C<~A~> extends B{}
-class<~A,B~>D extends<~A~>C{
- class<~A~> E{}
+class D<~A,B~> extends C<~A~> {
+ class E<~A~> {}
class G extends ld
{A0I:}
- var <~A~>d d;
+ var D<~A~> d;
}
-var <~int~>D d;
+var D<~int~> d;
-struct <~A~> S{
+struct S<~A~> {
var A a0;
var A a1;
}
-var <~int~>S si;
-var <~float~>S sf;
+var D<~int~> si;
+var D<~float~> sf;
<<< si.a0 >>>;
<<< sf.a0 >>>;
-var <~int~>Ptr ptr;
+var Ptr<~int~> ptr;
var int i[4];
foreach(ref a : i)
<<< *a >>>;
-class <~A~>C {
+class C<~A~> {
class D {
}
}
-var <~int~>C.D d;
+var C.D<~int~> d;
-class<~A,B~> C {
+class C<~A,B~> {
var A a;
var B b;
fun A test() {
}
}
-var <~int, int~>C c;
-var <~float, int~>C d;
-var <~Object, int~>C g;
+var C<~int, int~> c;
+var C<~float, int~> d;
+var C<~Object, int~> g;
<<< c.a >>>;
<<< d.a >>>;
<<< c.test() >>>;
-class <~A~>C {
+class C<~A~> {
\a{};
[ 1 ];
var int i,j;
i ? i : !i;
++i;
union { int ui; } u;
- union <~A~>U{ int ui; };
+ union U<~A~> { int ui; };
typeof(i);
if(i) i; else i;
for(var int _i; _i < 1; ++_i);
while(0){ <<< __func__ >>>; }
}
-var <~int~>C c;
+var C<~int~> c;
-class <~A~> C {
+class C<~A~> {
var A a;
}
-class D extends <~int~>C {}
+class D extends C<~int~> {}
var D d;
<<<d.a>>>;
-class <~A, B~> C{}
-class <~A~> D {}
-var <~ <~int~>D, <~int~>D ~>C c;
+class C<~A, B~> {}
+class D<~A~> {}
+var C<~ D<~int~>, D<~int~> ~> c;
<<< c >>>;
-class<~A~> C {
+class C<~A~> {
var A a;
}
class D {
- var static <~int~>C c;
+ var static C<~int~> c;
}
var D d;
-class <~A~>C {}
+class C<~A~> {}
-var <~int, float~>C c;
+var C<~int, float~> c;
-class<~A~> C {}
+class C<~A~> {}
-var <~int~>C c;
+var C<~int~> c;
<<< c >>>;
-class <~A~>C {
+class C<~A~> {
fun void test() {
- var <~A~>C c;
+ var C<~A~> c;
}
}
-var <~int~>C c;
+var C<~int~> c;
typedef void t_ptr<~A~>();
-var <~int~>t_ptr iptr;
-var <~float~>t_ptr fptr;
+var t_ptr<~int~> iptr;
+var t_ptr<~float~> fptr;
fun void test<~A~>() {
<<< __func__ >>>;
<<< __func__ >>>;
}
-typedef <~int~>t_ptr B;
+typedef t_ptr<~int~> B;
var B b;
<<< b >>>;
test @=> b;
<<< b() >>>;
-typedef <~float~>t_ptr C;
+typedef t_ptr<~float~> C;
var C c;
<<< c >>>;
test @=> c;
class C {
typedef void t_ptr<~A~>();
- var <~int~>t_ptr iptr;
+ var t_ptr<~int~> iptr;
fun void test<~A~>() {
<<< this, " ", __func__ >>>;
-union <~A~> U{
+union U<~A~>{
int i;
A a;
};
-var <~float~>U u;
+var U<~float~> u;
<<< u.a >>>;
return i + 3;
}
-<<< 2 @add>>>;
+<<< 2 $add>>>;
return i + 3;
}
-<<< (@add) 2 >>>;
+<<< ($add) 2 >>>;