We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Complex
1 parent 2afae11 commit 2b71259Copy full SHA for 2b71259
Compiler/test/inference.jl
@@ -3549,8 +3549,14 @@ f31974(n::Int) = f31974(1:n)
3549
# call cycles.
3550
@test code_typed(f31974, Tuple{Int}) !== nothing
3551
3552
-f_overly_abstract_complex() = Complex(Ref{Number}(1)[])
3553
-@test Base.return_types(f_overly_abstract_complex, Tuple{}) == [Complex]
+# Issue #33472
+struct WrapperWithUnionall33472{T<:Real}
3554
+ x::T
3555
+end
3556
+
3557
+f_overly_abstract33472() = WrapperWithUnionall33472(Base.inferencebarrier(1)::Number)
3558
+# Check that this doesn't infer as `WrapperWithUnionall33472{T<:Number}`.
3559
+@test Base.return_types(f_overly_abstract33472, Tuple{}) == [WrapperWithUnionall33472]
3560
3561
# Issue 26724
3562
const IntRange = AbstractUnitRange{<:Integer}
0 commit comments