fix(library/compiler/vm_compiler): ignore applications of the form (neutral ...) during code generation

This commit is contained in:
Leonardo de Moura 2016-05-25 17:52:42 -07:00
parent 856f6bcbdf
commit f9624b4c49

View file

@ -189,7 +189,9 @@ class vm_compiler_fn {
emit_apply_instr(args.size());
return;
} else if (is_constant(fn)) {
if (optional<vm_decl> decl = get_vm_decl(m_env, const_name(fn))) {
if (is_neutral_expr(fn)) {
emit(mk_sconstructor_instr(0));
} else if (optional<vm_decl> decl = get_vm_decl(m_env, const_name(fn))) {
compile_global(*decl, args.size(), args.data(), bpz, m);
} else {
throw_unknown_constant(const_name(fn));