Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type Discovery from onTypeNotFound occluded #11330

Open
0b1kn00b opened this issue Oct 12, 2023 · 0 comments
Open

Type Discovery from onTypeNotFound occluded #11330

0b1kn00b opened this issue Oct 12, 2023 · 0 comments

Comments

@0b1kn00b
Copy link

There"s no way to reference a real unknown type from onTypeNotFound unless it isn"t in a module.

Say I want to build types for an existing type, and try for import shadow.${x} to build for type x:

If the type is found in module pack.Module.ActualType and I Context.getType on pack.Module.ActualType, the search assumes firstly ActualType is a property of pack.Module.

If I getType on pack.ActualType, there"s no way of finding which module of package pack it might be in and I don"t think there"s a way to import.

Running through every single type via metadata a-la tink_syntaxhub seems rather heavy duty (and compile times confirm) where now the onTypeNotFound mechanism exists, as above, there"s loads that can"t be inferred.

The other mechanism is onAfterTyping which requires a complete traversal of types rather than case-by-case.

see:

TypeLookupInconsistency.zip

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

No branches or pull requests

1 participant