mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Fix problems using reflection on interface types #1203.
This commit is contained in:
@@ -302,6 +302,7 @@ enum TypeKind : char
|
||||
VECTOR,
|
||||
DISTINCT,
|
||||
POINTER,
|
||||
INTERFACE,
|
||||
}
|
||||
|
||||
struct TypeEnum
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
- Better checking of operator methods.
|
||||
- Bug when assigning an optional from an optional.
|
||||
- Lambdas were not type checked thoroughly #1185.
|
||||
- Fix problems using reflection on interface types #1203.
|
||||
|
||||
### Stdlib changes
|
||||
- "init_new/init_temp" removed.
|
||||
|
||||
@@ -3112,6 +3112,7 @@ static inline bool sema_expr_analyse_type_access(SemaContext *context, Expr *exp
|
||||
return sema_expr_rewrite_to_type_property(context, expr, canonical, type_property_by_name(name), parent_type);
|
||||
}
|
||||
}
|
||||
|
||||
if (!type_may_have_sub_elements(canonical))
|
||||
{
|
||||
if (missing_ref) goto MISSING_REF;
|
||||
@@ -3153,6 +3154,7 @@ static inline bool sema_expr_analyse_type_access(SemaContext *context, Expr *exp
|
||||
case DECL_STRUCT:
|
||||
case DECL_DISTINCT:
|
||||
case DECL_BITSTRUCT:
|
||||
case DECL_INTERFACE:
|
||||
break;
|
||||
default:
|
||||
UNREACHABLE
|
||||
|
||||
Reference in New Issue
Block a user