diff options
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/15-struct-hoisting/shed.toml | 9 | ||||
| -rw-r--r-- | examples/15-struct-hoisting/src/HelloWorld.shed | 12 |
2 files changed, 21 insertions, 0 deletions
diff --git a/examples/15-struct-hoisting/shed.toml b/examples/15-struct-hoisting/shed.toml new file mode 100644 index 00000000..156fa7c6 --- /dev/null +++ b/examples/15-struct-hoisting/shed.toml @@ -0,0 +1,9 @@ +[shed] +main = "HelloWorld" + +[[shed.bins]] +name = "hello-world" + +[[shed.examples]] +bin = "hello-world" +expected-output = "hello, world" diff --git a/examples/15-struct-hoisting/src/HelloWorld.shed b/examples/15-struct-hoisting/src/HelloWorld.shed new file mode 100644 index 00000000..d9caa802 --- /dev/null +++ b/examples/15-struct-hoisting/src/HelloWorld.shed @@ -0,0 +1,12 @@ +val messageParts = MessageParts(.part1 = "hello, ", .part2 = "world\n"); + +fun main() ! Io -> Unit { + print!(messageParts.part1); + print!(messageParts.part2); +} + +struct MessageParts( + .part1: String, + .part2: String, +) { +} |
