mirror of
https://github.com/roc-lang/roc.git
synced 2025-12-23 08:48:03 +00:00
20 lines
419 B
Text
20 lines
419 B
Text
app [main!] { pf: platform "./platform/main.roc" }
|
|
|
|
import pf.Stdout
|
|
|
|
# Type with to_inspect returning wrong type (I64 instead of Str)
|
|
BadColor := [Red, Green, Blue].{
|
|
to_inspect : BadColor -> I64
|
|
to_inspect = |color| match color {
|
|
Red => 1
|
|
Green => 2
|
|
Blue => 3
|
|
}
|
|
}
|
|
|
|
main! = || {
|
|
red : BadColor
|
|
red = Red
|
|
result = Str.inspect(red)
|
|
Stdout.line!("Result: ${result}")
|
|
}
|