MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

improve class expression validation

+2 -2
+2 -2
src/ant.c
··· 13155 13155 if (super_proto_off != 0) { 13156 13156 super_proto = resolveprop(js, mkval(T_PROP, super_proto_off)); 13157 13157 } 13158 - if (vtype(super_proto) != T_OBJ && vtype(super_proto) != T_NULL) { 13158 + if (!is_object_type(super_proto) && vtype(super_proto) != T_NULL) { 13159 13159 return js_mkerr(js, "super class prototype must be an object or null"); 13160 13160 } 13161 13161 } else return js_mkerr(js, "super class must be a constructor"); ··· 13165 13165 if (is_err(proto)) return proto; 13166 13166 13167 13167 if (super_expr_len > 0) { 13168 - if (vtype(super_proto) == T_OBJ || vtype(super_proto) == T_NULL) { 13168 + if (is_object_type(super_proto) || vtype(super_proto) == T_NULL) { 13169 13169 set_proto(js, proto, super_proto); 13170 13170 } else { 13171 13171 jsval_t object_proto = get_ctor_proto(js, "Object", 6);