mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-10 18:09:32 +00:00
Fix #6979
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -79,6 +79,7 @@ else
|
||||
echo "SUCCESSFUL 0/1"
|
||||
exit 1
|
||||
fi
|
||||
$ODIN check ../test_issue_6979.odin -no-entry-point $COMMON
|
||||
|
||||
set +x
|
||||
|
||||
|
||||
7
tests/issues/test_issue_6979.odin
Normal file
7
tests/issues/test_issue_6979.odin
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user