Skip to content

Commit

Permalink
Add compatibility for rename from super() to supertype()
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Jan 2, 2016
1 parent 6de3fba commit d360cca
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ Currently, the `@compat` macro supports the following syntaxes:

* `base64` is now `base64encode` [#9157](https://github.com/JuliaLang/julia/pull/9157)

* `super` is now `supertype` [#14338](https://github.com/JuliaLang/julia/pull/14338)

## New macros

* `@inline` and `@noinline` have been added. On 0.3, these are "no-ops," meaning they don't actually do anything.
Expand Down
5 changes: 5 additions & 0 deletions src/Compat.jl
Original file line number Diff line number Diff line change
Expand Up @@ -712,4 +712,9 @@ else
import Base.Filesystem
end

if VERSION < v"0.5.0-dev+1946"
const supertype = super
export supertype
end

end # module
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -548,3 +548,6 @@ Base.remote_do(() -> true, 1) # Doesn't return anything so cannot be `@test`ed b

# JuliaLang/julia#12819
@test Compat.Filesystem.JL_O_RDWR == Compat.Filesystem.JL_O_RDWR

# JuliaLang/julia#14338
@test supertype(Int) == Signed

0 comments on commit d360cca

Please sign in to comment.