@@ -213,58 +213,60 @@ mktemp() do fname, f
213213 end
214214end
215215
216- types = [
217- Bool,
218- Float16,
219- Float32,
220- Float64,
221- Int128,
222- Int16,
223- Int32,
224- Int64,
225- Int8,
226- UInt16,
227- UInt32,
228- UInt64,
229- UInt8,
230- ]
231- for T in types
232- # julia#18510, Nullable constructors
233- x = @compat Nullable (one (T), true )
234- @test isnull (x) === false
235- @test isa (x. value, T)
236- @test eltype (x) === T
237-
238- x = @compat Nullable {T} (one (T), true )
239- y = @compat Nullable {Any} (one (T), true )
240- @test isnull (x) === false
241- @test isnull (y) === false
242- @test isa (x. value, T)
243- @test eltype (x) === T
244- @test eltype (y) === Any
245-
246- x = @compat Nullable {T} (one (T), false )
247- y = @compat Nullable {Any} (one (T), false )
248- @test isnull (x) === true
249- @test isnull (y) === true
250- @test eltype (x) === T
251- @test eltype (y) === Any
252-
253- x = @compat Nullable (one (T), false )
254- @test isnull (x) === true
255- @test eltype (x) === T
256-
257- x = @compat Nullable {T} ()
258- @test isnull (x) === true
259- @test eltype (x) === T
260-
261- # julia#18484, generic isnull, unsafe_get
262- a = one (T)
263- x = @compat Nullable (a, true )
264- @test isequal (unsafe_get (x), a)
265-
266- x = @compat Nullable {Array{T}} ()
267- @test_throws UndefRefError unsafe_get (x)
216+ if VERSION < v " 0.7.0-DEV.3017"
217+ types = [
218+ Bool,
219+ Float16,
220+ Float32,
221+ Float64,
222+ Int128,
223+ Int16,
224+ Int32,
225+ Int64,
226+ Int8,
227+ UInt16,
228+ UInt32,
229+ UInt64,
230+ UInt8,
231+ ]
232+ for T in types
233+ # julia#18510, Nullable constructors
234+ x = @compat Nullable (one (T), true )
235+ @test isnull (x) === false
236+ @test isa (x. value, T)
237+ @test eltype (x) === T
238+
239+ x = @compat Nullable {T} (one (T), true )
240+ y = @compat Nullable {Any} (one (T), true )
241+ @test isnull (x) === false
242+ @test isnull (y) === false
243+ @test isa (x. value, T)
244+ @test eltype (x) === T
245+ @test eltype (y) === Any
246+
247+ x = @compat Nullable {T} (one (T), false )
248+ y = @compat Nullable {Any} (one (T), false )
249+ @test isnull (x) === true
250+ @test isnull (y) === true
251+ @test eltype (x) === T
252+ @test eltype (y) === Any
253+
254+ x = @compat Nullable (one (T), false )
255+ @test isnull (x) === true
256+ @test eltype (x) === T
257+
258+ x = @compat Nullable {T} ()
259+ @test isnull (x) === true
260+ @test eltype (x) === T
261+
262+ # julia#18484, generic isnull, unsafe_get
263+ a = one (T)
264+ x = @compat Nullable (a, true )
265+ @test isequal (unsafe_get (x), a)
266+
267+ x = @compat Nullable {Array{T}} ()
268+ @test_throws UndefRefError unsafe_get (x)
269+ end
268270end
269271
270272@test xor (1 ,5 ) == 4
0 commit comments