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

respecialize normalized vararg type parameters as part of precise_container_type #22877

Merged
merged 4 commits into from
Jul 21, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
add test for #22875 fix
  • Loading branch information
jrevels committed Jul 20, 2017
commit 9643c5e3347b504c21c19cad298a1a56ffee945f
8 changes: 8 additions & 0 deletions test/inference.jl
Original file line number Diff line number Diff line change
Expand Up @@ -922,6 +922,14 @@ let niter = 0
@test niter == 4
end

# issue #22875

typeargs = (Type{Int},)
@test Base.Core.Inference.return_type((args...) -> one(args...), typeargs) === Int

typeargs = (Type{Int},Type{Int},Type{Int},Type{Int},Type{Int},Type{Int})
@test Base.Core.Inference.return_type(promote_type, typeargs) === Type{Int}

# demonstrate that inference must converge
# while doing constant propagation
Base.@pure plus1(x) = x + 1
Expand Down