From 69627cc0e8d157bb44e973e560ed30fc218fd8e6 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 27 Dec 2016 20:17:40 -0400 Subject: - Now doing a CHECKCAST for method returns, to avoid having the JVM verifier complain about types. --- luxc/src/lux/compiler/host.clj | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'luxc') 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))) -- cgit v1.2.3