make grammer/parser use simple adts, fix it so adt literals aren't closed over by accident

This commit is contained in:
Nathan Braswell
2015-08-30 01:53:11 -04:00
parent 5f3f3e5a66
commit 13c6044193
4 changed files with 39 additions and 29 deletions

View File

@@ -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)