This commit is contained in:
azizur100389 2026-11-06 07:54:43 +00:00 • committed by GitHub
commit ff65db69dd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 11 deletions

View file

@ -350,12 +350,6 @@
"category": "same-file",
"basis": "Identical scenario body in one file, using the same helpers, input data and assertions. Enclosing setup has no relevant difference."
},
{
"a": "test/unit/model/registration-table.test.ts#behavior group isolation > Impl hooks write to types.registerImpl, never to types.registerClass",
"b": "test/unit/model/registration-table.test.ts#hook behavior (real registries, no mocks) > implHook writes to types.registerImpl, NOT types.registerClass",
"category": "same-file",
"basis": "Identical scenario body in one file, using the same helpers, input data and assertions. Enclosing setup has no relevant difference."
},
{
"a": "test/unit/scope-resolution/function-local-import-chain.test.ts#Python: a function-local import reaches the IMPORTS reason > `def f(): from m import X` is deferred",
"b": "test/unit/scope-resolution/function-local-import-chain.test.ts#Rust: a function-local `use` is NOT deferred > Python still defers on the same run",

View file

@ -200,13 +200,16 @@ describe('behavior group isolation', () => {
expect(deps.fields.lookupFieldByOwner('unrelated', 'User')).toBeUndefined();
});
it('Impl hooks write to types.registerImpl, never to types.registerClass', () => {
it('keeps an existing Class separate from a same-name Impl', () => {
const deps = makeDeps();
const table = createRegistrationTable(deps);
const def = makeDef({ nodeId: 'impl:User', type: 'Impl' });
table.get('Impl')!('User', def);
expect(deps.types.lookupImplByName('User')).toHaveLength(1);
expect(deps.types.lookupClassByName('User')).toHaveLength(0);
const classDef = makeDef({ nodeId: 'class:User', type: 'Class', qualifiedName: 'app.User' });
const implDef = makeDef({ nodeId: 'impl:User', type: 'Impl' });
table.get('Class')!('User', classDef);
table.get('Impl')!('User', implDef);
expect(deps.types.lookupClassByName('User')).toEqual([classDef]);
expect(deps.types.lookupClassByQualifiedName('app.User')).toEqual([classDef]);
expect(deps.types.lookupImplByName('User')).toEqual([implDef]);
});
});