@@ -9,5 +9,24 @@ import ApproxFunOrthogonalPolynomials: jacobip
99 # Tests whether invalid/unimplemented arguments correctly throws ArgumentError
1010 @test_throws ArgumentError Conversion (Ultraspherical (2 ), Ultraspherical (1 ))
1111 @test_throws ArgumentError Conversion (Ultraspherical (3 ), Ultraspherical (1.9 ))
12+
13+ # Conversions from Chebyshev to Ultraspherical should lead to a small union of types
14+ Tallowed = Union{
15+ ApproxFunBase. ConcreteConversion{
16+ Chebyshev{ChebyshevInterval{Float64}, Float64},
17+ Ultraspherical{Int64, ChebyshevInterval{Float64}, Float64}, Float64},
18+ ApproxFunBase. ConversionWrapper{TimesOperator{Float64, Tuple{Int64, Int64}}, Float64}};
19+ @inferred Tallowed Conversion (Chebyshev (), Ultraspherical (1 ));
20+ @inferred Tallowed Conversion (Chebyshev (), Ultraspherical (2 ));
21+ # Conversions between Ultraspherical should lead to a small union of types
22+ Tallowed = Union{
23+ ApproxFunBase. ConcreteConversion{
24+ Ultraspherical{Int64, ChebyshevInterval{Float64}, Float64},
25+ Ultraspherical{Int64, ChebyshevInterval{Float64}, Float64}, Float64},
26+ ApproxFunBase. ConversionWrapper{
27+ ConstantOperator{Float64,
28+ Ultraspherical{Int64, ChebyshevInterval{Float64}, Float64}}, Float64},
29+ ApproxFunBase. ConversionWrapper{TimesOperator{Float64, Tuple{Int64, Int64}}, Float64}};
30+ @inferred Tallowed Conversion (Ultraspherical (1 ), Ultraspherical (2 ));
1231 end
1332end
0 commit comments