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

fix incorrect static parameter definedness check #49097

Merged
merged 1 commit into from
Mar 23, 2023
Merged

fix incorrect static parameter definedness check #49097

merged 1 commit into from
Mar 23, 2023

Conversation

aviatesk
Copy link
Member

@aviatesk aviatesk commented Mar 22, 2023

We use the specialized signature of a method for accurate analysis of whether a static parameter is constrained or not. However, it turns out that we can only use it when it doesn't contain any free type variables (which it sometimes does, e.g., when the inference entry is given a signature with a free type variable). In such cases, we should use the method signature, which, by design, never contains any free type variables.

fix #49027 See Jameson's comment below.

We use the specialized signature of a method for accurate analysis of
whether a static parameter is constrained or not. However, it turns out
that we can only use it when it doesn't contain any free type variables
(which it sometimes does, e.g., when the inference entry is given a
signature with a free type variable). In such cases, we should use the
method signature, which, by design, never contains any free type
variables.

fix #49027
@aviatesk aviatesk added compiler:inference Type inference backport 1.9 Change should be backported to release-1.9 labels Mar 22, 2023
@aviatesk aviatesk added this to the 1.9 milestone Mar 22, 2023
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

Note that this should not close the linked issue, as it is merely a workaround to hide the problem. But it seems good as a workaround that can be backported for now.

@aviatesk aviatesk merged commit 489d076 into master Mar 23, 2023
@aviatesk aviatesk deleted the avi/49027 branch March 23, 2023 01:23
aviatesk added a commit that referenced this pull request Mar 23, 2023
We use the specialized signature of a method for accurate analysis of
whether a static parameter is constrained or not. However, it turns out
that we can only use it when it doesn't contain any free type variables
(which it sometimes does, e.g., when the inference entry is given a
signature with a free type variable). In such cases, we should use the
method signature, which, by design, never contains any free type
variables.
@KristofferC KristofferC mentioned this pull request Mar 24, 2023
52 tasks
@KristofferC KristofferC removed the backport 1.9 Change should be backported to release-1.9 label Mar 31, 2023
Xnartharax pushed a commit to Xnartharax/julia that referenced this pull request Apr 19, 2023
We use the specialized signature of a method for accurate analysis of
whether a static parameter is constrained or not. However, it turns out
that we can only use it when it doesn't contain any free type variables
(which it sometimes does, e.g., when the inference entry is given a
signature with a free type variable). In such cases, we should use the
method signature, which, by design, never contains any free type
variables.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:inference Type inference
Projects
None yet
Development

Successfully merging this pull request may close these issues.

call signature with free type variable can corrupt the dispatch cache
3 participants