diff options
author | Eduardo Julian | 2016-01-02 23:53:54 -0400 |
---|---|---|
committer | Eduardo Julian | 2016-01-02 23:53:54 -0400 |
commit | 46a8d84e3f48396d68db2f854644b7b83c3a102c (patch) | |
tree | be1008a696ec7fc5ba74a2901b607e078e15b58d /src/lux/compiler/case.clj | |
parent | d7c9dcc381596e8ae1617af23ffbf71190737173 (diff) |
- Switched from TupleT to ProdT (type-wise).
Diffstat (limited to '')
-rw-r--r-- | src/lux/compiler/case.clj | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/lux/compiler/case.clj b/src/lux/compiler/case.clj index e0d1b886e..1a4006312 100644 --- a/src/lux/compiler/case.clj +++ b/src/lux/compiler/case.clj @@ -86,10 +86,16 @@ (.visitJumpInsn Opcodes/GOTO $target)) (&a-case/$TupleTestAC ?members) - (if (&/|empty? ?members) + (|case ?members + (&/$Nil) (doto writer (.visitInsn Opcodes/POP) (.visitJumpInsn Opcodes/GOTO $target)) + + (&/$Cons ?member (&/$Nil)) + (compile-match ?member $target $else) + + _ (doto writer (.visitTypeInsn Opcodes/CHECKCAST "[Ljava/lang/Object;") (-> (doto (.visitInsn Opcodes/DUP) |