Skip to content

Commit 9ee0854

Browse files
committed
make Integer explicit again
1 parent 26efc09 commit 9ee0854

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

test/no_invalidations.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function type_expr(f, supertype::Type)
4545
end
4646
end
4747

48-
function test_expr(f, supertype::Type = Integer)
48+
function test_expr(f, supertype::Type)
4949
e = type_expr(f, supertype)
5050
ThereAreNoInvalidations.there_are_no_invalidations(e)
5151
end
@@ -55,13 +55,13 @@ end
5555
@testset "construction of old int type from new type" begin
5656
broken = (Int8, UInt8, UInt16, Int, UInt)
5757
@testset "T: $T" for T int_types
58-
@test test_expr(n -> :(Base.$T(::$n) = $T(0))) broken=(T broken)
58+
@test test_expr((n -> :(Base.$T(::$n) = $T(0))), Integer) broken=(T broken)
5959
end
6060
end
6161
@testset "construction of new int type from old type" begin
6262
broken = ()
6363
@testset "T: $T" for T int_types
64-
@test test_expr(n -> :($n(::$T) = $n())) broken=(T broken)
64+
@test test_expr((n -> :($n(::$T) = $n())), Integer) broken=(T broken)
6565
end
6666
end
6767
@testset "arithmetic between old int types and new int type" begin
@@ -70,8 +70,8 @@ end
7070
@testset "T: $T" for T int_types
7171
@testset "op: $op" for op ops
7272
@test (
73-
test_expr(n -> :(Base.$op(::$n, m::$T) = m)) &&
74-
test_expr(n -> :(Base.$op(m::$T, ::$n) = m))
73+
test_expr((n -> :(Base.$op(::$n, m::$T) = m)), Integer) &&
74+
test_expr((n -> :(Base.$op(m::$T, ::$n) = m)), Integer)
7575
) broken=((T, op) broken)
7676
end
7777
end
@@ -80,13 +80,13 @@ end
8080
broken = (Bool, UInt8, Int)
8181
@testset "T: $T" for T int_types
8282
@test (
83-
test_expr(n -> :(Base.promote_rule(::Type{$T}, ::Type{$n}) = $T)) &&
84-
test_expr(n -> :(Base.promote_rule(::Type{$n}, ::Type{$T}) = $T))
83+
test_expr((n -> :(Base.promote_rule(::Type{$T}, ::Type{$n}) = $T)), Integer) &&
84+
test_expr((n -> :(Base.promote_rule(::Type{$n}, ::Type{$T}) = $T)), Integer)
8585
) broken=(T broken)
8686
end
8787
end
8888
@testset "unary functions" begin
89-
@test test_expr(n -> :(Base.zero(::$n) = $n())) broken=true
90-
@test test_expr(n -> :(Base.one(::$n) = $n())) broken=true
89+
@test test_expr((n -> :(Base.zero(::$n) = $n())), Integer) broken=true
90+
@test test_expr((n -> :(Base.one(::$n) = $n())), Integer) broken=true
9191
end
9292
end

0 commit comments

Comments
 (0)