Skip to content

Commit e546efa

Browse files
committed
Drop compat code for isabstracttype and isconcretetype (from #477)
1 parent 20b3ff8 commit e546efa

File tree

4 files changed

+8
-30
lines changed

4 files changed

+8
-30
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,9 +323,6 @@ Currently, the `@compat` macro supports the following syntaxes:
323323
for entries with no match and gives the index of the first (rather than the last) match
324324
([#25662], [#25998]).
325325

326-
* `isabstract` and `isleaftype` are now `isabstracttype` and `isconcretetype`, respectively
327-
([#23666], [#25496]).
328-
329326
* `gc` and `gc_enable` are now `GC.gc` and `GC.enable`, respectively ([#25616]).
330327

331328
* `endof` is now `lastindex` ([#25458]). (Note that `lastindex(A, n)` is not supported.)

src/Compat.jl

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ import Sockets
77

88
include("compatmacro.jl")
99

10-
@static if !isdefined(Base, :isabstracttype) # VERSION < v"0.7.0-DEV.3475"
11-
const isabstracttype = Base.isabstract
12-
export isabstracttype
13-
end
14-
1510
module TypeUtils
1611
using Base: parameter_upper_bound, typename
1712
using Compat: isabstracttype
@@ -285,20 +280,6 @@ if VERSION < v"0.7.0-DEV.1325"
285280
end
286281
end
287282

288-
289-
# 0.7.0-DEV.3475
290-
@static if !isdefined(Base, :isconcretetype)
291-
# 0.7.0-DEV.1775
292-
@static if !isdefined(Base, :isconcrete)
293-
const isconcretetype = isleaftype
294-
const isconcrete = isleaftype # for compatibility with earlier Compat versions
295-
export isconcrete
296-
else
297-
const isconcretetype = isconcrete
298-
end
299-
export isconcretetype
300-
end
301-
302283
# 0.7.0-DEV.2005
303284
if VERSION < v"0.7.0-DEV.2005"
304285
const Mmap = Base.Mmap

test/old.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,11 @@ using Compat
4747
using Compat.Test
4848
@test (@__MODULE__) === Test22064
4949
end
50+
51+
@test isabstracttype(AbstractFoo20006)
52+
@test !isabstracttype(ConcreteFoo20006)
53+
@test !isabstracttype(ConcreteFoo20006N)
54+
@test !isabstracttype(ConcreteFoo200061)
55+
@test !isabstracttype(StridedArray)
56+
# 0.7
57+
@test isconcretetype(Int)

test/runtests.jl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ eval(Expr(
8585
@test !Compat.TypeUtils.isabstract(StridedArray)
8686
@test Compat.TypeUtils.parameter_upper_bound(ConcreteFoo20006, 1) == Int
8787
@test isa(Compat.TypeUtils.typename(Array), Core.TypeName)
88-
@test isabstracttype(AbstractFoo20006)
89-
@test !isabstracttype(ConcreteFoo20006)
90-
@test !isabstracttype(ConcreteFoo20006N)
91-
@test !isabstracttype(ConcreteFoo200061)
92-
@test !isabstracttype(StridedArray)
9388

9489
# PR 20203
9590
@test Compat.readline(IOBuffer("Hello, World!\n")) == "Hello, World!"
@@ -320,9 +315,6 @@ if VERSION < v"0.7.0-DEV.5238"
320315
@test cov([1, 2], [0, 10], corrected=false) === 2.5
321316
end
322317

323-
# 0.7
324-
@test isconcretetype(Int)
325-
326318
# 0.7
327319
module Test23876
328320
using Compat

0 commit comments

Comments
 (0)