aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorGanesh Viswanathan <dev@genotrance.com>2020-03-21 12:51:12 -0500
committerGanesh Viswanathan <dev@genotrance.com>2020-03-21 20:07:45 -0500
commitbe1e85934d39b7d0d8ef481593c0c4cbae333310 (patch)
treee526062b394bccb1956412bd905c515f763acecf /tests
parent4cfeea67a1152534e620db9832785f3ee5f9b259 (diff)
downloadnimterop-be1e85934d39b7d0d8ef481593c0c4cbae333310.tar.gz
nimterop-be1e85934d39b7d0d8ef481593c0c4cbae333310.zip
ast2 forward declaration support
Diffstat (limited to 'tests')
-rw-r--r--tests/include/tast2.h10
-rw-r--r--tests/tast2.nim4
2 files changed, 12 insertions, 2 deletions
diff --git a/tests/include/tast2.h b/tests/include/tast2.h
index 5cabfac..e9339ae 100644
--- a/tests/include/tast2.h
+++ b/tests/include/tast2.h
@@ -14,6 +14,11 @@ typedef int *A6;
typedef A0 **A7;
typedef void *A8;
+// Forward declaration
+struct A0 {
+ int f1;
+};
+
typedef char *A9p[3]; //, A9[4];
typedef char *A10[3][6];
typedef char *(*A11)[3];
@@ -67,6 +72,11 @@ typedef int *A6;
typedef A0 **A7;
typedef void *A8;
+// Forward declaration
+struct A0 {
+ int f1;
+};
+
typedef char *A9p[3]; //, A9[4];
typedef char *A10[3][6];
typedef char *(*A11)[3];
diff --git a/tests/tast2.nim b/tests/tast2.nim
index 40c7886..6465acc 100644
--- a/tests/tast2.nim
+++ b/tests/tast2.nim
@@ -32,9 +32,9 @@ assert D == "hello"
assert E == 'c'
assert A0 is object
-testFields(A0)
+testFields(A0, {"f1": "cint"}.toTable())
assert A1 is A0
-testFields(A1)
+testFields(A1, {"f1": "cint"}.toTable())
assert A2 is object
testFields(A2)
assert A3 is object