Thanks Erik, though I am not quite clear how it would break things.

As for the real goal:

Name2 is also templated such as Name2{A} and Name2{B}. There are lots of 
methods that dispatch depending on Name2{A} or Name2{B}.

I want to add a subtype of Name2 (which I call Name1) that still correctly 
dispatches for those methods. Another way I would like to do it is:

abstract Name1{Name2{T <: AvsB} <: Name2{T} 

but of course that also does not work.

Thanks!

On Saturday, April 2, 2016 at 11:55:47 AM UTC-7, Erik Schnetter wrote:
>
> If you define an abstract type `Name1{S}`, then Julia automatically 
> defines another abstract type `Name` with `Name1{S} <: Name`. 
>
> This would break if you tried to insert `S` into the type hierarchy as 
> well. 
>
> -erik 
>
> On Sat, Apr 2, 2016 at 2:51 PM, Tomas Lycken <[email protected] 
> <javascript:>> wrote: 
> > If it's abstract, what is the purpose of the type parameter? In other 
> words, 
> > what is the ultimate goal you're reaching for? 
> > 
> > //T 
> > 
> > On Saturday, April 2, 2016 at 3:17:34 AM UTC+2, Scott Lundberg wrote: 
> >> 
> >> You can define: 
> >> 
> >> abstract Name1{S <: Name2} <: Name3{S} 
> >> 
> >> but I want to define: 
> >> 
> >> abstract Name1{S <: Name2} <: S 
> >> 
> >> However the second line does not work. Is there some other way to 
> >> accomplish the same thing? Thanks! 
>
>
>
> -- 
> Erik Schnetter <[email protected] <javascript:>> 
> http://www.perimeterinstitute.ca/personal/eschnetter/ 
>

Reply via email to