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

typealiases with parameter no longer works as expected #9378

Closed
dlfivefifty opened this issue Dec 16, 2014 · 6 comments
Closed

typealiases with parameter no longer works as expected #9378

dlfivefifty opened this issue Dec 16, 2014 · 6 comments
Labels
regression Regression in behavior compared to a previous version

Comments

@dlfivefifty
Copy link
Contributor

The following returns true in 0.3 but false in 0.4

abstract Foo{T,S}
immutable B{T} end
typealias FooB{T} Foo{T,B}
immutable CFoo <: FooB{Float64}end
isa(CFoo(),FooB)

@ivarne
Copy link
Member

ivarne commented Dec 17, 2014

I can confirm that the behaviour difference between 0.3 and 0.4.

I'm confused with such complicated types, so others will have to judge if this is a regression or a bugfix.

@stevengj
Copy link
Member

Seems like a bug to me. If CFoo <: FooB{Float64} then we should always have CFoo <: FooB, but the latter returns false in Julia 0.4.

@stevengj stevengj added bug Indicates an unexpected problem or unintended behavior regression Regression in behavior compared to a previous version and removed bug Indicates an unexpected problem or unintended behavior labels Dec 18, 2014
@elextr
Copy link

elextr commented Dec 18, 2014

If CFoo <: FooB{Float64} implies the more general CFoo <: FooB does that not then imply then imply that CFoo <: FooB{Int64} or other more specific types, and is that the correct behaviour?

@stevengj
Copy link
Member

@elextr, no it does not imply that, because FooB{Int64} <: FooB, not the other way around. A triangle is a polygon and a square is a polygon, but it does not follow that a triangle is a square.

@elextr
Copy link

elextr commented Dec 18, 2014

D'oh, yeah FooB{Int64} <: FooB is down a different unrelated branch of the subtype tree from FooB{Float64} <: FooB.

@dlfivefifty
Copy link
Contributor Author

To motivate it getting fixed: ApproxFun.jl won't work in 0.4 until it is

vtjnash added a commit that referenced this issue May 9, 2019
As mentioned in #9378.
Fix recursion issue mentioned in #25796 by using inst_datatype_inner
instead of inst_datatype, so that we shouldn't be making copies of
any non-bound objects (anything maybe-cacheable) now.
vtjnash added a commit that referenced this issue May 29, 2019
As mentioned in #9378.
Fix recursion issue mentioned in #25796 by using inst_datatype_inner
instead of inst_datatype, so that we shouldn't be making copies of
any non-bound objects (anything maybe-cacheable) now.
vtjnash added a commit that referenced this issue May 29, 2019
As mentioned in #9378.
Fix recursion issue mentioned in #25796 by using inst_datatype_inner
instead of inst_datatype, so that we shouldn't be making copies of
any non-bound objects (anything maybe-cacheable) now.
vtjnash added a commit that referenced this issue May 29, 2019
As mentioned in #9378.
Fix recursion issue mentioned in #25796 by using inst_datatype_inner
instead of inst_datatype, so that we shouldn't be making copies of
any non-bound objects (anything maybe-cacheable) now.
vtjnash added a commit that referenced this issue May 31, 2019
As mentioned in #9378.
Fix recursion issue mentioned in #25796 by using inst_datatype_inner
instead of inst_datatype, so that we shouldn't be making copies of
any non-bound objects (anything maybe-cacheable) now.
JeffBezanson pushed a commit that referenced this issue Jun 18, 2019
As mentioned in #9378.
Fix recursion issue mentioned in #25796 by using inst_datatype_inner
instead of inst_datatype, so that we shouldn't be making copies of
any non-bound objects (anything maybe-cacheable) now.
(cherry picked from commit 217507f)
KristofferC pushed a commit that referenced this issue Jun 19, 2019
As mentioned in #9378.
Fix recursion issue mentioned in #25796 by using inst_datatype_inner
instead of inst_datatype, so that we shouldn't be making copies of
any non-bound objects (anything maybe-cacheable) now.
(cherry picked from commit 217507f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version
Projects
None yet
Development

No branches or pull requests

4 participants