You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When types contain isbits parameters, the runtime's built-in printing for these datatypes can end up printing a value whose type doesn't round-trip correctly, causing a (silently) incorrect pre-compile statement:
$ julia --trace-compile=stderr-q
julia>foo(::Type{T}) where T =rand(Bool)
foo (generic function with 1 method)
julia>foo(Tuple{1.0})
precompile(Tuple{typeof(Main.foo), Type{Tuple{1}}})
The problem is that jl_ isn't very careful about giving you a literal of the correct type:
This is another version of #28808, but I thought it was worth opening a separate issue since these are "valid" types but they are the wrong types (and we get it wrong for quite common values like Float64).