summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/tests/types/cast.asy
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/tests/types/cast.asy')
-rw-r--r--Build/source/utils/asymptote/tests/types/cast.asy13
1 files changed, 13 insertions, 0 deletions
diff --git a/Build/source/utils/asymptote/tests/types/cast.asy b/Build/source/utils/asymptote/tests/types/cast.asy
new file mode 100644
index 00000000000..b1191637554
--- /dev/null
+++ b/Build/source/utils/asymptote/tests/types/cast.asy
@@ -0,0 +1,13 @@
+import TestLib;
+StartTest("cast");
+struct A {
+ public int x;
+}
+A operator cast(int x) {
+ A a=new A;
+ a.x=x;
+ return a;
+}
+A a=7;
+assert(a.x==7);
+EndTest();