diff options
| -rw-r--r-- | examples/19-function-expression-infer-return-type/shed.toml | 7 | ||||
| -rw-r--r-- | examples/19-function-expression-infer-return-type/src/HelloWorld.shed | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/examples/19-function-expression-infer-return-type/shed.toml b/examples/19-function-expression-infer-return-type/shed.toml new file mode 100644 index 00000000..bf5c13c4 --- /dev/null +++ b/examples/19-function-expression-infer-return-type/shed.toml @@ -0,0 +1,7 @@ +[[shed.bins]] +name = "hello-world" +main-namespace = "HelloWorld" + +[[shed.examples]] +bin = "hello-world" +expected-output = "hello, world" diff --git a/examples/19-function-expression-infer-return-type/src/HelloWorld.shed b/examples/19-function-expression-infer-return-type/src/HelloWorld.shed new file mode 100644 index 00000000..1c93c946 --- /dev/null +++ b/examples/19-function-expression-infer-return-type/src/HelloWorld.shed @@ -0,0 +1,4 @@ +pub fun main() ! Io -> Unit { + val message = fn () { "hello, world\n" }; + print!(message()); +} |
