Emitter: Remove impossible check for a variant.
Variant build originally produced a type of the variant class. Now and
for a while it produces a sometimes-incomplete type of the enum. This
code is now impossible, and there's already a test in
test/verify_enums.lily that would tap this if it wasn't impossible.
@@ -2216,10 +2216,6 @@ static void eval_oo_access_for_item(lily_emit_state *emit, lily_ast *ast)
lily_class *lookup_class = ast->arg_start->result->type->cls;
- /* This allows variant values to use enum methods. */
- if (lookup_class->item_kind == ITEM_TYPE_VARIANT)
- lookup_class = lookup_class->parent;
-
char *oo_name = lily_sp_get(emit->expr_strings, ast->pile_pos);
lily_item *item = lily_find_or_dl_member(emit->parser, lookup_class,
oo_name, NULL);
