abouttreesummaryrefslogcommitdiff
path: root/test
diff options
context:
space:
mode:
authorPatrick Schönberger2021-08-12 09:25:17 +0200
committerPatrick Schönberger2021-08-12 09:25:17 +0200
commite8e6aebbb892a72b287f1378901f855246da15a2 (patch)
treeee9add2cafa78f86ec1084f295f8b865ff399680 /test
parent3b7b6d9a84bfc5f328c2ed78ca72a836a67468ae (diff)
downloadtoc-e8e6aebbb892a72b287f1378901f855246da15a2.tar.gz
toc-e8e6aebbb892a72b287f1378901f855246da15a2.zip
fixed NAME grammar rule
Diffstat (limited to 'test')
-rw-r--r--test/test.toc18
1 files changed, 10 insertions, 8 deletions
diff --git a/test/test.toc b/test/test.toc
index b3ff1ea..38dc818 100644
--- a/test/test.toc
+++ b/test/test.toc
@@ -21,12 +21,6 @@ struct S1<T1, T2> {
}
}
-struct S2 {
- s: char *;
- abc(): S2 { }
- xyz(): S2 { }
-}
-
func generic1<A>(a1 : A, a2 : A) : A {
return a1 + a2;
}
@@ -64,6 +58,14 @@ namespace N1 {
}
}
+ struct S2 {
+ s: char *;
+ abc(): S1 {
+ var result : S1;
+ return result;
+ }
+ }
+
func f1() : void {
// these have the same type
var s1 : N1::N2::S1;
@@ -93,8 +95,8 @@ func main(argc : int, argv : char**) : int {
generic1<int>(1, 2);
generic1<double>(3.4, 5.6);
- var s: S2;
- s.abc().xyz();
+ var s: N1::N2::S2;
+ s.abc();
return 0;
} \ No newline at end of file