-Subproject commit fbd0bdbb2950dbfc8f62167c795390500d660cfa
+Subproject commit 334325fab4ff94b04713e87a5b1be4cd0ff24574
-template<~A~> fun void test(A a) { <<<a>>>; }
+fun<~A~> void test(A a) { <<<a>>>; }
1 => test;
1.3 => test;
test(1);
class C {
- template<~a~>
- function void test(a var){ <<<var>>>; }
+ function<~a~> void test(a var){ <<<var>>>; }
class D { int i;}
}
-template <~a~>
-function void test (a var){ <<< var>>>; }
-template <~a, b~>
-function void test (a var, b var2){ <<< var>>>; }
-//function void test (){ }
-
+function<~A~> void test (A var){ <<< var>>>; }
+function<~A,B~> void test (A var, B var2){ <<< var>>>; }
test<~int~>(1);
-//test<float>(1.4);
-//test<int>(3, 1.4);
-//test<float>(3);
-//test(3, 1.4);
test<~float, float~>(3, 1.4);
-//test<float, float, int>(3, 1.4);
class C {
- template<~A~>
- fun int test(A a) { <<<" A ", a>>>; }
- template<~A~>
- fun int test(A a, int i) { <<<" ", a >>>; }
- template<~A~>
- fun int test(A a, int i, int j) { <<<a>>>; }
+ fun<~A~> int test(A a) { <<<" A ", a>>>; }
+ fun<~A~> int test(A a, int i) { <<<" ", a >>>; }
+ fun<~A~> int test(A a, int i, int j) { <<<a>>>; }
}
class D extends C {
- template<~A~>
- fun int test(A a, int i) { <<<this, " extent ", a, __func__>>>; }
+ fun int<~A~> test(A a, int i) { <<<this, " extent ", a, __func__>>>; }
}
class E extends D {
- template<~A~>
- fun int test(A a, int i) { <<<this, " Extent ", a, __func__>>>; }
+ fun int<~A~> test(A a, int i) { <<<this, " Extent ", a, __func__>>>; }
}
-template <~A, B~>
-function void test(A a, B b){<<<a, ", ", b>>>;}
+function void<~A,B~> test(A a, B b){<<<a, ", ", b>>>;}
test(1, 2.1);
test(1.1, 2.1);
test(1.2, 2);
-template <~a~>
-fun void test(...) {
+fun<~A~> void test(...) {
vararg.start;
<<<vararg.i>>>;
vararg.end;
class Tester
{
- template<~A~>
- function int assert_equal(string description, A a, A b){ if(a == b) return 0; return 1; }
- template<~A~>
- function int assert_not_equal(string description, A a, A b){ if(a != b) return 0; return 1; }
+ function<~A~> int assert_equal(string description, A a, A b){ if(a == b) return 0; return 1; }
+ function<~A~> int assert_not_equal(string description, A a, A b){ if(a != b) return 0; return 1; }
}
Tester t;
-//template <~a~>
function void test(){}
-//function void test(int i[]){<<<i>>>;}
-//function void test(Object o){}
-
test([1], 2.3);
// [contains] you must provide template types
-template<~A~>
-class C {
+class<~A~> C {
A a;
}
// [contains]
- template<~a, b~>
-function void test(){}
+function<~A,B~> void test(){}
test();
// [contains] arguments do not match for template call
-template <~i~>
-function void test(){ <<<"func">>>;}
-template <~i~>
-function void test(int i){<<<"other func">>>;}
+function<~A~> void test(){ <<<"func">>>;}
+function<~A~> void test(int i){<<<"other func">>>;}
test<~int, float, int~>();
//test<~int~>();
// [contains] arguments do not match for template call
class C {
- template <~a~>
- function void test(float f) {}
- template <~a~>
- function void test() {}
+ function<~A~> void test(float f) {}
+ function<~A~> void test() {}
}
C c;
//c.test<~int~>();
// [contains] invalid expression for function call
-template<~A~>
-function void test(A a){}
+function<~A~> void test(A a){}
(maybe ? test : test)(1);
// [contains] unknown type
- template<~my_type~>
-function void my_function() { <<<"test">>>; }
+function<~A~> void my_function() { <<<"test">>>; }
my_function<~unknown_type~>();
fun A test() {
<<<"lol">>>;
}
- template<~C~>
- fun void test2(C c) {
+ fun<~C~> void test2(C c) {
<<<c>>>;
}
}
-template <~A~>
-class C {
+class<~A~> C {
A a;
}
-template<~A~>
-class C {}
+class<~A~> C {}
<~int~>C ref;
<<<ref>>>;
class C extends lol { int i;}
C c;
<<<c.i>>>;
-template <~A~> class D {
+class<~A~> D {
<<<"lol">>>;
int i;
}