Skip to content

fix false UNDECLARED TYPE for anno-only declarations in type modules#9223

Open
Anton-4 wants to merge 1 commit intomainfrom
fix-9216
Open

fix false UNDECLARED TYPE for anno-only declarations in type modules#9223
Anton-4 wants to merge 1 commit intomainfrom
fix-9216

Conversation

@Anton-4
Copy link
Collaborator

@Anton-4 Anton-4 commented Feb 28, 2026

Type aliases (e.g. MyType : Str) were not yet in scope when anno-only annotations (e.g. hey : MyType without a definition) were canonicalized, because type name introduction ran after anno-only annotation processing. Swap the two phases so type names are available when anno-only annotations resolve them.

Closes #9216

Type aliases (e.g. `MyType : Str`) were not yet in scope when
anno-only annotations (e.g. `hey : MyType` without a definition)
were canonicalized, because type name introduction ran after
anno-only annotation processing. Swap the two phases so type
names are available when anno-only annotations resolve them.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

False positive undeclared type error

1 participant