aboutsummaryrefslogtreecommitdiff
path: root/examples/37-struct-methods
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2025-02-02 19:10:44 +0000
committerMichael Williamson <mike@zwobble.org>2025-02-02 19:53:22 +0000
commit6ead9f417fabd55cc26a93c6d54bdde1110fccd4 (patch)
treeec43bf0f0f97d329e63229da812ae82b7df132aa /examples/37-struct-methods
parentcab0787d8c259b21baa376ba1ec2d95740964bd9 (diff)
Add runtime support for relational int operations
Diffstat (limited to 'examples/37-struct-methods')
-rw-r--r--examples/37-struct-methods/shed-examples.json59
-rw-r--r--examples/37-struct-methods/shed.json58
-rw-r--r--examples/37-struct-methods/src/HelloWorld.shed17
3 files changed, 0 insertions, 34 deletions
diff --git a/examples/37-struct-methods/shed-examples.json5 b/examples/37-struct-methods/shed-examples.json5
deleted file mode 100644
index 95fb0a97..00000000
--- a/examples/37-struct-methods/shed-examples.json5
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- examples: [
- {
- project: ".",
- bin: "hello-world",
- expectedOutput: "one\ntwo\nmany",
- },
- ],
-}
diff --git a/examples/37-struct-methods/shed.json5 b/examples/37-struct-methods/shed.json5
deleted file mode 100644
index a6c8e563..00000000
--- a/examples/37-struct-methods/shed.json5
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- bins: [
- {
- name: "hello-world",
- mainNamespace: "HelloWorld",
- },
- ],
-}
diff --git a/examples/37-struct-methods/src/HelloWorld.shed b/examples/37-struct-methods/src/HelloWorld.shed
deleted file mode 100644
index cfba064d..00000000
--- a/examples/37-struct-methods/src/HelloWorld.shed
+++ /dev/null
@@ -1,17 +0,0 @@
-pub fun main() ! Io -> Unit {
- print!(Count(1).message());
- print!(Count(2).message());
- print!(Count(3).message());
-}
-
-struct Count(value: Int) {
- fun message(this) -> String {
- if (this.value == 1) {
- "one\n"
- } else if (this.value == 2) {
- "two\n"
- } else {
- "many\n"
- }
- }
-}