aboutsummaryrefslogtreecommitdiff
path: root/tests/enums/enums.ek
diff options
context:
space:
mode:
Diffstat (limited to 'tests/enums/enums.ek')
-rw-r--r--tests/enums/enums.ek23
1 files changed, 23 insertions, 0 deletions
diff --git a/tests/enums/enums.ek b/tests/enums/enums.ek
new file mode 100644
index 0000000..ef7850c
--- /dev/null
+++ b/tests/enums/enums.ek
@@ -0,0 +1,23 @@
+typedef i27 {
+ add(i27 a, i27 b => i27) {
+ return a + b;
+ }
+};
+
+typedef i9 {};
+
+enum A {
+ a = 200,
+ b
+}
+
+enum B: i9 {
+ b, c
+}
+
+main()
+{
+ const a = a::A;
+ const b = b::B;
+ const c = a.add(b as i27);
+}