mirror of
https://github.com/odin-lang/Odin.git
synced 2026-02-12 06:18:39 +00:00
Merge branch 'master' of https://github.com/odin-lang/Odin
This commit is contained in:
@@ -1133,7 +1133,11 @@ gb_internal void check_assignment(CheckerContext *c, Operand *operand, Type *typ
|
||||
x.mode = Addressing_Value;
|
||||
x.type = t;
|
||||
if (check_is_assignable_to(c, &x, type)) {
|
||||
add_entity_use(c, operand->expr, e);
|
||||
if (operand->expr->kind == Ast_SelectorExpr) {
|
||||
add_entity_use(c, operand->expr->SelectorExpr.selector, e);
|
||||
} else {
|
||||
add_entity_use(c, operand->expr, e);
|
||||
}
|
||||
good = true;
|
||||
break;
|
||||
}
|
||||
|
||||
11
tests/internal/test_imported_proc_groups.odin
Normal file
11
tests/internal/test_imported_proc_groups.odin
Normal file
@@ -0,0 +1,11 @@
|
||||
package test_internal
|
||||
|
||||
import "core:testing"
|
||||
import "test_imported_proc_groups"
|
||||
|
||||
// https://github.com/odin-lang/Odin/pull/6119
|
||||
@test
|
||||
test_use_imported_proc_group_as_argument :: proc(t: ^testing.T) {
|
||||
use_proc :: proc(proc()) { }
|
||||
use_proc(test_imported_proc_groups.proc_group)
|
||||
}
|
||||
4
tests/internal/test_imported_proc_groups/proc_group.odin
Normal file
4
tests/internal/test_imported_proc_groups/proc_group.odin
Normal file
@@ -0,0 +1,4 @@
|
||||
package test_imported_proc_groups
|
||||
|
||||
proc_group :: proc{empty_proc}
|
||||
empty_proc :: proc() { }
|
||||
Reference in New Issue
Block a user