@@ -1339,6 +1339,26 @@ let egal_tfunc
1339
1339
@test egal_tfunc (Union{Int64, Float64}, AbstractArray) === Const (false )
1340
1340
end
1341
1341
1342
+ using Core. Compiler: PartialStruct, nfields_tfunc, sizeof_tfunc, sizeof_nothrow
1343
+ let PT = PartialStruct (Tuple{Int64,UInt64}, Any[Const (10 , false ), UInt64])
1344
+ @test sizeof_tfunc (PT) === Const (16 , false )
1345
+ @test nfields_tfunc (PT) === Const (2 , false )
1346
+ @test sizeof_nothrow (PT) === true
1347
+ end
1348
+ @test sizeof_nothrow (Const (Tuple)) === false
1349
+
1350
+ using Core. Compiler: typeof_tfunc
1351
+ @test typeof_tfunc (Tuple{Vararg{Int}}) == Type{Tuple{Vararg{Int,N}}} where N
1352
+ @test typeof_tfunc (Tuple{Any}) == Type{<: Tuple{Any} }
1353
+ @test typeof_tfunc (Type{Array}) === DataType
1354
+ @test typeof_tfunc (Type{<: Array }) === DataType
1355
+ @test typeof_tfunc (Array{Int}) == Type{Array{Int,N}} where N
1356
+ @test typeof_tfunc (AbstractArray{Int}) == Type{<: AbstractArray{Int,N} } where N
1357
+ @test typeof_tfunc (Union{<: T , <: Real } where T<: Complex ) == Union{Type{Complex{T}} where T<: Real , Type{<: Real }}
1358
+
1359
+ f_typeof_tfunc (x) = typeof (x)
1360
+ @test Base. return_types (f_typeof_tfunc, (Union{<: T , Int} where T<: Complex ,)) == Any[Union{Type{Int}, Type{Complex{T}} where T<: Real }]
1361
+
1342
1362
function f23024 (:: Type{T} , :: Int ) where T
1343
1363
1 + 1
1344
1364
end
0 commit comments