We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Abstract and concrete parametric types can inherit from other parametric types with contradictory type constraints for example:
julia> abstract type A{T<:Int} end julia> abstract type B{T<:Array} <: A{T} end julia> struct C{T} <: B{T} f::T end
None of these types can ever be used
julia> B{Array} ERROR: TypeError: in A, in T, expected T<:Int64, got Type{Array} Stacktrace: [1] top-level scope at none:0 julia> B{Int} ERROR: TypeError: in B, in T, expected T<:Array, got Type{Int64} Stacktrace: [1] top-level scope at none:0 julia> C(3) ERROR: TypeError: in B, in T, expected T<:Array, got Type{Int64} Stacktrace: [1] C(::Int64) at ./REPL[3]:2 [2] top-level scope at none:0 julia> c([3]) ERROR: UndefVarError: c not defined Stacktrace: [1] top-level scope at none:0 julia> versioninfo() Julia Version 1.0.1 Commit 0d713926f8 (2018-09-29 19:05 UTC) Platform Info: OS: macOS (x86_64-apple-darwin14.5.0) CPU: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-6.0.0 (ORCJIT, haswell)
The text was updated successfully, but these errors were encountered:
Mostly a duplicate of #9441. (#24179 also slightly related)
Sorry, something went wrong.
Closing as duplicate of #9441.
No branches or pull requests
Abstract and concrete parametric types can inherit from other parametric types with contradictory type constraints for example:
None of these types can ever be used
The text was updated successfully, but these errors were encountered: