aboutsummaryrefslogtreecommitdiff
path: root/luxc
diff options
context:
space:
mode:
authorEduardo Julian2016-12-27 20:17:40 -0400
committerEduardo Julian2016-12-27 20:17:40 -0400
commit69627cc0e8d157bb44e973e560ed30fc218fd8e6 (patch)
treefa1fdd6555a63f9296849c36fc213ce1d8f38376 /luxc
parenta10ff8416855e2079ba8da48cae43c80414666d0 (diff)
- Now doing a CHECKCAST for method returns, to avoid having the JVM verifier complain about types.
Diffstat (limited to '')
-rw-r--r--luxc/src/lux/compiler/host.clj5
1 files changed, 5 insertions, 0 deletions
diff --git a/luxc/src/lux/compiler/host.clj b/luxc/src/lux/compiler/host.clj
index c1ed8880d..5f98bcdb9 100644
--- a/luxc/src/lux/compiler/host.clj
+++ b/luxc/src/lux/compiler/host.clj
@@ -171,6 +171,11 @@
(doto writer
&&/unwrap-char
(.visitInsn Opcodes/IRETURN))
+
+ (&/$GenericClass _class-name (&/$Nil))
+ (doto writer
+ (.visitTypeInsn Opcodes/CHECKCAST (&host-generics/->bytecode-class-name _class-name))
+ (.visitInsn Opcodes/ARETURN))
_
(.visitInsn writer Opcodes/ARETURN)))