-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add at-compat for new type declaration syntax and fix depwarn in tests #325
Conversation
Another question is if we should implement something like @struct typename{T} <: basetype{T} begin
field::T
end
@mutable typename2{T} <: basetype2{T} begin
field::T
end Similar to (but uglier than) the soon to be removed |
README.md
Outdated
@@ -71,6 +71,10 @@ Currently, the `@compat` macro supports the following syntaxes: | |||
* `@compat Array{<:Real}` and similar uses of `<:T` to define a set of parameterized types ([#20414]). | |||
In 0.4 and 0.5, this only works for non-nested usages (e.g. you can't define `Array{<:Array{<:Real}}`). | |||
|
|||
* `@compat abstract type T end` and `@compat primitive type T 8 end` | |||
to declare abstract and primitive types. This only work when |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only works when
xref the base PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
@@ -1353,8 +1353,10 @@ end | |||
end | |||
@test do_boundscheck() == true | |||
|
|||
@test Compat.promote_eltype_op(@functorize(+), ones(2,2), 1) === Float64 | |||
@test Compat.promote_eltype_op(@functorize(*), ones(Int, 2), zeros(Int16,2)) === Int | |||
if VERSION < v"0.6.0-dev.1886" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what changed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
promote_eltype_op
was deprecated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be worth a comment to that effect
e2a302b
to
816a7aa
Compare
The 14 packages I've tested works well with this, with only |
Was added in #325, now obsolete as no longer required on minimum supported Julia version 0.6.
* Remove at-compat for type aliases Was added in #326, now obsolete as no longer required on minimum supported Julia version 0.6. * Remove at-compat for Nullable construction Was added in #287, now obsolete as no longer required on minimum supported Julia version 0.6. * Remove at-compat for Foo{<:Bar} sugar Was added in #317 (and #336), now obsolete as no longer required on minimum supported Julia version 0.6. * Remove at-compat for index styles Was added in #329, now obsolete as no longer required on minimum supported Julia version 0.6. * Remove at-compat for type declarations Was added in #325, now obsolete as no longer required on minimum supported Julia version 0.6. * Remove unused at-compat helper functions * Remove README entries for removed at-compat functionality * new style call overloading (added in #181, removed in #385) * `get(io, s false)` (added in #212, #215, #225, removed in #385) * `.=` (added in #292 and #316, removed in #372) * Remove `Compat.collect(A)` Was added in #350 and #351, now obsolete as no longer required on minimum supported Julia version 0.6.
No description provided.