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 Base.return_types for direct builtin calls #46443

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

aviatesk
Copy link
Member

This commit also changed this fragile test case

@test Base.return_types(Expr) == Any[Expr]

to

@test only(Base.return_types(Core._expr)) === Expr

since Expr is just a generic function and can be overloaded
in the future (e.g. the JuliaSyntax.jl integration PR).

This commit also changed this fragile test case
```
@test Base.return_types(Expr) == Any[Expr]
```
to
```
@test only(Base.return_types(Core._expr)) === Expr
```
since `Expr` is just a generic function and can be overloaded
in the future (e.g. the JuliaSyntax.jl integration PR).
@aviatesk aviatesk force-pushed the avi/return_types_builtin branch from 4842df0 to ff85ff8 Compare August 23, 2022 09:18
@aviatesk aviatesk merged commit 18fa383 into master Aug 23, 2022
@aviatesk aviatesk deleted the avi/return_types_builtin branch August 23, 2022 13:44
end
effects = Core.Compiler.EFFECTS_TOTAL
matches = _methods(f, types, -1, world)::Vector
if isempty(matches)
Copy link
Member

@vtjnash vtjnash Sep 1, 2022

Choose a reason for hiding this comment

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

shouldn't this need to check for the ambiguous flag and fully_covers flag (like inlining) to be entirely correct? (if so, we can convert this comment to a new issue)

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, we should account for that. This isempty-based check is not sound.

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