This commit is contained in:
RoBaertschi
2026-07-09 14:14:05 +02:00
parent 40698f774f
commit c44740f570
4 changed files with 10 additions and 1 deletions

View File

@@ -1142,7 +1142,7 @@ gb_internal void check_assignment(CheckerContext *c, Operand *operand, Type *typ
if (operand->mode == Addressing_Type && is_type_typeid(type)) {
add_type_info_type(c, operand->type);
add_type_and_value(c, operand->expr, Addressing_Value, type, exact_value_typeid(operand->type));
add_type_and_value(c, operand->expr, Addressing_Constant, type, exact_value_typeid(operand->type));
return;
}

View File

@@ -37,6 +37,7 @@ set COMMON=-define:ODIN_TEST_FANCY=false -file -vet -strict-style -ignore-unused
..\..\..\odin test ..\test_pr_6476.odin %COMMON% || exit /b
..\..\..\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
@echo off

View File

@@ -79,6 +79,7 @@ else
echo "SUCCESSFUL 0/1"
exit 1
fi
$ODIN check ../test_issue_6979.odin -no-entry-point $COMMON
set +x

View File

@@ -0,0 +1,7 @@
// Tests issue https://github.com/odin-lang/Odin/issues/6979
package test_issues
error :: proc() -> typeid {
data :: struct{type: typeid}{int}
return data.type
}