mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-22 07:31:10 +00:00
@@ -2004,11 +2004,11 @@ gb_internal Entity *check_ident(CheckerContext *c, Operand *o, Ast *n, Type *nam
|
||||
}
|
||||
if (o->type != nullptr && o->type->kind == Type_Named && o->type->Named.type_name->TypeName.is_type_alias) {
|
||||
Type *bt = base_type(o->type);
|
||||
if (bt != nullptr) {
|
||||
// Keep struct aliases named so recursive fields retain their alias edge.
|
||||
if (bt != nullptr && bt->kind != Type_Struct) {
|
||||
o->type = bt;
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case Entity_ImportName:
|
||||
|
||||
@@ -38,6 +38,7 @@ set COMMON=-define:ODIN_TEST_FANCY=false -file -vet -strict-style -ignore-unused
|
||||
..\..\..\odin check ..\test_issue_6484.odin -no-entry-point %COMMON% || exit /b
|
||||
..\..\..\odin check ..\test_issue_6874.odin %COMMON% 2>&1 | find /c "Error:" | findstr /x "1" || exit /b
|
||||
..\..\..\odin check ..\test_issue_6979.odin -no-entry-point %COMMON% || exit /b
|
||||
..\..\..\odin build ..\test_issue_7037.odin %COMMON% -o:none || exit /b
|
||||
|
||||
@echo off
|
||||
|
||||
|
||||
@@ -80,6 +80,7 @@ else
|
||||
exit 1
|
||||
fi
|
||||
$ODIN check ../test_issue_6979.odin -no-entry-point $COMMON
|
||||
$ODIN build ../test_issue_7037.odin $COMMON -o:none
|
||||
|
||||
|
||||
clang -c ../test_issue_7010.c -o test_issue_7010_c.o
|
||||
|
||||
19
tests/issues/test_issue_7037.odin
Normal file
19
tests/issues/test_issue_7037.odin
Normal file
@@ -0,0 +1,19 @@
|
||||
// Tests issue #7037 https://github.com/odin-lang/Odin/issues/7037
|
||||
|
||||
package test_issues
|
||||
|
||||
Arena :: struct {
|
||||
last: ^ArenaAllocation,
|
||||
}
|
||||
|
||||
_ArenaAllocation :: struct {
|
||||
prev: ^ArenaAllocation,
|
||||
}
|
||||
|
||||
ArenaAllocation :: _ArenaAllocation
|
||||
|
||||
main :: proc() {
|
||||
arena: Arena
|
||||
allocation: ArenaAllocation
|
||||
arena.last = &allocation
|
||||
}
|
||||
Reference in New Issue
Block a user