Skip to content

problem with the unreliable approximation of Core.Compiler.return_type #35800

Open

Description

Using Julia master (newer than 301db97), the following does not infer the correct type (see also the discussion in #34048):

using Test, LinearAlgebra
# @inferred mapreduce(norm, +, [rand(1)]);
@inferred mapreduce(norm, +, [rand(1)]; init = 0.);

Note that the third line works if you comment out the second line (start from a fresh Julia session), which makes testing this issue difficult.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

bugIndicates an unexpected problem or unintended behaviorcompiler:inferenceType inference

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions