make grammer/parser use simple adts, fix it so adt literals aren't closed over by accident
This commit is contained in:
@@ -5,8 +5,12 @@ adt options {
|
||||
option1
|
||||
}
|
||||
|
||||
fun can_pass(it: options): options {
|
||||
return options::option1
|
||||
}
|
||||
|
||||
fun main():int {
|
||||
var it: options = options::option1
|
||||
var it: options = can_pass(options::option0)
|
||||
if (it == options::option0)
|
||||
println("nope")
|
||||
if (it == options::option1)
|
||||
|
||||
Reference in New Issue
Block a user