Handle protocol inheritance. Allow overlapping protocol methods. Remove the need for &self in protocol declarations. Fix cast rules for protocol. Fix cast rules for bitstruct #1034.

This commit is contained in:
Christoffer Lerno
2023-10-08 01:54:30 +02:00
committed by Christoffer Lerno
parent 99cfaa1583
commit 312a39ee24
17 changed files with 615 additions and 52 deletions

View File

@@ -1445,6 +1445,9 @@ void llvm_emit_cast(GenContext *c, CastKind cast_kind, Expr *expr, BEValue *valu
value->value = LLVMBuildIsNotNull(c->builder, value->value, "ptrbool");
value->kind = BE_BOOLEAN;
break;
case CAST_BSINTARR:
case CAST_INTARRBS:
break;
case CAST_BOOLINT:
llvm_value_rvalue(c, value);
value->value = LLVMBuildZExt(c->builder, value->value, llvm_get_type(c, to_type), "boolsi");