mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-17 00:11:25 -07:00
Fix overloading bug due to #import .; Add sys/wgl.odin
This commit is contained in:
@@ -1715,6 +1715,12 @@ void check_import_entities(Checker *c, MapScope *file_scopes) {
|
||||
continue;
|
||||
}
|
||||
if (id->is_import) {
|
||||
// String gpa = str_lit("GetProcAddress");
|
||||
// if (str_eq(e->token.string, gpa)) {
|
||||
// Entity *f = scope_lookup_entity(parent_scope, gpa);
|
||||
// gb_printf_err("%.*s %.*s %td\n", LIT(gpa), LIT(f->token.pos.file), entity_procedure_overload_count(f));
|
||||
// }
|
||||
|
||||
if (is_entity_exported(e)) {
|
||||
// TODO(bill): Should these entities be imported but cause an error when used?
|
||||
bool ok = add_entity(c, parent_scope, NULL, e);
|
||||
@@ -1722,6 +1728,12 @@ void check_import_entities(Checker *c, MapScope *file_scopes) {
|
||||
map_bool_set(&parent_scope->implicit, hash_pointer(e), true);
|
||||
}
|
||||
}
|
||||
|
||||
// if (str_eq(e->token.string, gpa)) {
|
||||
// Entity *f = scope_lookup_entity(parent_scope, gpa);
|
||||
// gb_printf_err("%.*s %.*s %td\n", LIT(gpa), LIT(f->token.pos.file), entity_procedure_overload_count(f));
|
||||
// }
|
||||
|
||||
} else {
|
||||
add_entity(c, parent_scope, NULL, e);
|
||||
}
|
||||
@@ -1736,6 +1748,8 @@ void check_import_entities(Checker *c, MapScope *file_scopes) {
|
||||
Entity *e = make_entity_import_name(c->allocator, parent_scope, id->import_name, t_invalid,
|
||||
id->fullpath, id->import_name.string,
|
||||
scope);
|
||||
|
||||
|
||||
add_entity(c, parent_scope, NULL, e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user