mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 03:51:18 +00:00
- Resolving a missing property on a const enum with inline, reached an assert #2597.
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
- Add sigsegv stacktrace in test and regular errors for Darwin Arm64. #1105
|
||||
- Incorrect error message when using generic type that isn't imported #2589
|
||||
- `String.to_integer` does not correctly return in some cases where it should #2590.
|
||||
- Resolving a missing property on a const enum with inline, reached an assert #2597.
|
||||
|
||||
### Stdlib changes
|
||||
- Add `CGFloat` `CGPoint` `CGSize` `CGRect` types to core_foundation (macOS).
|
||||
|
||||
@@ -1038,7 +1038,8 @@ Decl *sema_resolve_type_method(SemaContext *context, CanonicalType *type, const
|
||||
type = type_decl->distinct->type->canonical;
|
||||
goto RETRY;
|
||||
case TYPE_ENUM:
|
||||
type = type_decl->enums.type_info->type->canonical;
|
||||
case TYPE_CONST_ENUM:
|
||||
type = enum_inner_type(type);
|
||||
goto RETRY;
|
||||
default:
|
||||
UNREACHABLE
|
||||
|
||||
12
test/test_suite/enumerations/enum_no_inline_property.c3
Normal file
12
test/test_suite/enumerations/enum_no_inline_property.c3
Normal file
@@ -0,0 +1,12 @@
|
||||
module test;
|
||||
enum MyEnum : const inline short
|
||||
{
|
||||
ITEM1,
|
||||
ITEM2,
|
||||
}
|
||||
|
||||
fn int main(String[] args)
|
||||
{
|
||||
$typefrom("MyEnum").oops; // #error: No method or inner struct/union 'MyEnum.oops'
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user