diff --git a/src/lj_crecord.c b/src/lj_crecord.c index 85362ea5..4adfefe6 100644 --- a/src/lj_crecord.c +++ b/src/lj_crecord.c @@ -811,6 +811,8 @@ again: } J->base[0] = lj_ir_kint(J, (int32_t)fct->size); return; /* Interpreter will throw for newindex. */ + } else if (cd && cd->ctypeid == CTID_CTYPEID) { + /* Only resolve constants and metamethods for constructors. */ } else if (ctype_isbitfield(fct->info)) { lj_trace_err(J, LJ_TRERR_NYICONV); } else {