Skip to content

Type inference regression with try / finally #26743

Closed

Description

function f()
    try
        return 5
    finally
    end
end

Base.Test.@inferred f()

Works on v0.5 and v0.6 but fails on v0.7 with:

ERROR: return type Int64 does not match inferred return type Union{Nothing, Int64}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

compiler:inferenceType inferencecompiler:loweringSyntax lowering (compiler front end, 2nd stage)regressionRegression in behavior compared to a previous version

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions