diff --git a/docs/writeups/9-online-repl.md b/docs/writeups/9-online-repl.md new file mode 100644 index 0000000..0823879 --- /dev/null +++ b/docs/writeups/9-online-repl.md @@ -0,0 +1,19 @@ +# Online REPL landing page + +Just throwing ideas out there + +```rust +type Interjection = "hi"; +type Name = "world" | "jinko"; + +func greet(start: Interjection, to_greet: Name) { + println("{start} {name}!") +} + +greet("jinko", "world"); +``` + +```rust +error: cannot widen type `"jinko"` to value of type `"hi"` +note: hi to you too! +```