summary refs log tree commit diff stats
path: root/tests/compilerapi
diff options
context:
space:
mode:
authorJasper Jenkins <jasper.vs.jenkins@gmail.com>2019-11-28 14:01:17 -0800
committerAndreas Rumpf <rumpf_a@web.de>2019-11-28 23:01:17 +0100
commit9ea55eccbbc61c6e7429c094b6ced41ce5535aeb (patch)
tree6501d1808e349caa475d6432df1ea081d0fc61b2 /tests/compilerapi
parent0996eb174fdafc2980d21149dae5b5a7c5889dff (diff)
downloadNim-9ea55eccbbc61c6e7429c094b6ced41ce5535aeb.tar.gz
make addQuoted work on nimscript (#12717) [backport]
Diffstat (limited to 'tests/compilerapi')
-rw-r--r--tests/compilerapi/myscript.nim5
-rw-r--r--tests/compilerapi/tcompilerapi.nim1
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/compilerapi/myscript.nim b/tests/compilerapi/myscript.nim
index 539b07de1..c5d9fe22a 100644
--- a/tests/compilerapi/myscript.nim
+++ b/tests/compilerapi/myscript.nim
@@ -1,7 +1,12 @@
 
 import exposed
 
+type NumberHolder = object
+  ival: int
+  fval: float
+
 echo "top level statements are executed!"
+echo NumberHolder(ival: 10, fval: 2.0)
 
 proc hostProgramRunsThis*(a, b: float): float =
   result = addFloats(a, b, 1.0)
diff --git a/tests/compilerapi/tcompilerapi.nim b/tests/compilerapi/tcompilerapi.nim
index 494765a8b..edeaa2ba5 100644
--- a/tests/compilerapi/tcompilerapi.nim
+++ b/tests/compilerapi/tcompilerapi.nim
@@ -1,5 +1,6 @@
 discard """
   output: '''top level statements are executed!
+(ival: 10, fval: 2.0)
 2.0
 my secret
 11