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