Skip to content

Fix various type resolution failures #384

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

Merged
merged 4 commits into from
May 14, 2025
Merged

Fix various type resolution failures #384

merged 4 commits into from
May 14, 2025

Conversation

fourls
Copy link
Collaborator

@fourls fourls commented May 13, 2025

This PR fixes:

  • Name resolution failures around generic routine invocations, mostly because we were not specializing type constraints
  • Type resolution failures on as casts where the type expression is a function (e.g. GetFooClass)
  • Type resolution failures on constructors for class reference types (e.g. TFooClass.Create, which creates a TFoo)

@fourls fourls requested a review from Cirras May 13, 2025 02:14
fourls added 4 commits May 13, 2025 14:05
Previously, we were resolving all type parameter constraints before
resolving the type parameters themselves. This resulted in unresolved
types in cases where a later type parameter relied on a previous type
parameter.
We were previously not specializing type constraints, which was
resulting in the constraint checking the unspecialized type parameter
type for compatibility with the specialized type, which would always
fail.
@fourls fourls force-pushed the fix-generic-resolution branch from d526c2e to f824cc3 Compare May 13, 2025 04:05
@fourls fourls requested a review from Cirras May 13, 2025 04:06
Copy link
Collaborator

@Cirras Cirras left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

@Cirras Cirras merged commit 5b09e54 into master May 14, 2025
4 checks passed
@Cirras Cirras deleted the fix-generic-resolution branch May 14, 2025 02:37
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.

2 participants