[red-knot] Prevent cross-module query dependencies in own_instance_member (#16268)

This commit is contained in:
Micha Reiser 2025-02-20 17:46:45 +00:00 committed by GitHub
parent b385c7d22a
commit 470f852f04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 150 additions and 61 deletions

View file

@ -346,12 +346,14 @@ impl<'db> SemanticIndexBuilder<'db> {
// SAFETY: `definition_node` is guaranteed to be a child of `self.module`
let kind = unsafe { definition_node.into_owned(self.module.clone()) };
let category = kind.category();
let is_reexported = kind.is_reexported();
let definition = Definition::new(
self.db,
self.file,
self.current_scope(),
symbol,
kind,
is_reexported,
countme::Count::default(),
);