Skip to content
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

type system bug with comparing simple invariant bounds #23327

Closed
vtjnash opened this issue Aug 18, 2017 · 1 comment
Closed

type system bug with comparing simple invariant bounds #23327

vtjnash opened this issue Aug 18, 2017 · 1 comment
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch

Comments

@vtjnash
Copy link
Member

vtjnash commented Aug 18, 2017

julia> (Type{AbstractArray{Array{T}} where T}) <: Type{AbstractArray{S}} where S
true

julia> (Val{AbstractArray{Array{T}} where T}) <: Val{AbstractArray{T}} where T
true

julia> (Array{Array{Array{T}} where T}) <: Array{Array{T}} where T
true
@vtjnash vtjnash added bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch labels Aug 18, 2017
@mauro3
Copy link
Contributor

mauro3 commented Aug 22, 2017

Does this also cover below?

              _                     
   _       _ _(_)_     |  A fresh approach to technical computing          
  (_)     | (_) (_)    |  Documentation: https://docs.julialang.org        
   _ _   _| |_  __ _   |  Type "?help" for help.                           
  | | | | | | |/ _` |  |             
  | | |_| | | | (_| |  |  Version 0.7.0-DEV.1430 (2017-08-22 11:59 UTC)    
 _/ |\__'_|_|_|\__'_|  |  Commit e6c8b6b285* (0 days old master)           
|__/                   |  x86_64-pc-linux-gnu                              

julia> triangular(::Type{<:AbstractArray{T}}) where {T} = T # fix for test_broken: @isdefined(T) ? T : Any                                             
triangular (generic function with 1 method)                                

julia> triangular(::Type{<:AbstractArray}) = Any                           
triangular (generic function with 2 methods)                               

julia> triangular(Array{Array{T, 1}, 1} where T)                           
ERROR: UndefVarError: T not defined  
Stacktrace:                          
 [1] triangular(::Type{Array{Array{T,1},1} where T}) at ./REPL[1]:1        

julia> triangular(Array{Array{T, N}, 1} where {N,T})                       
ERROR: UndefVarError: T not defined  
Stacktrace:                          
 [1] triangular(::Type{Array{Array{T,N},1} where T where N}) at ./REPL[1]:1

julia> triangular(Array{Array{T, N}, NN} where {NN,N,T})                   
ERROR: UndefVarError: T not defined  
Stacktrace:                          
 [1] triangular(::Type{Array{Array{T,N},NN} where T where N where NN}) at ./REPL[1]:1                                                                  

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

No branches or pull requests

3 participants