aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/ptr.ek30
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/ptr.ek b/tests/ptr.ek
new file mode 100644
index 0000000..86f413c
--- /dev/null
+++ b/tests/ptr.ek
@@ -0,0 +1,30 @@
+typedef bool {}
+
+typedef i27 {
+ cmp![];
+ eq(i27 a, i27 b => bool) {
+ return a == b;
+ }
+}
+
+typedef ptr {
+ cmp![];
+ eq(ptr a, ptr b => bool) {
+ return a == b;
+ }
+}
+
+typedef test[cmp T] {}
+
+define cmp[] {
+ eq(cmp, cmp => bool);
+}
+
+main()
+{
+ const a = test![i27]{};
+ 20.eq(20);
+
+ const b = test![*i27]{};
+ a&.eq(a&);
+}