maybe https://github.com/JuliaLang/julia/issues/11160 ?
On Saturday, 6 June 2015 15:24:57 UTC-3, Yichao Yu wrote:
>
> A repeatable segfault.
>
> ```julia
> julia> abstract C{T<:Union(Void, Int)}
>
> julia> type D{T} <: C{T} d::T end
>
> julia> D(1.1)
> D{Float64}(D{Float64}(#= circular reference =#))
>
> julia> D{Float64}
> D{Float64}
>
> julia> D{Float64}()
> DERROR: MethodError: `convert` has no method matching
> convert(::Type{D{Float64}})
> This may have arisen from a call to the constructor D{Float64}(...),
> since type constructors fall back to convert methods.
> Closest candidates are:
> convert{T}(::Type{T}, ::T)
> D{T}(, ::Any)
> call{T}(::Type{T}, ::Any)
> in call at ./essentials.jl:44
>
> julia> D{Float64}(1.2)
> D{Float64}(D{Float64}(#= circular reference =#))
>
> julia> D{Float64}(1.1)
> D{Float64}(D{Float64}(#= circular reference =#))
>
> julia> d
> ERROR: UndefVarError: d not defined
>
> julia> d = D(1.1);
>
> signal (11): 段错误
> allocobj at /usr/bin/../lib/julia/libjulia.so (unknown line)
> call at ./no file:0
> unknown function (ip: 1761710235)
> jl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)
> call at ./no file:0
> unknown function (ip: 1761718475)
> jl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)
> unknown function (ip: 1742009091)
> unknown function (ip: 1742004502)
> unknown function (ip: 1742005227)
> unknown function (ip: 1742010769)
> unknown function (ip: 1742011865)
> unknown function (ip: 1742087735)
> jl_toplevel_eval_in at /usr/bin/../lib/julia/libjulia.so (unknown line)
> eval_user_input at ./REPL.jl:62
> unknown function (ip: 1761907943)
> jl_apply_generic at /usr/bin/../lib/julia/libjulia.so (unknown line)
> anonymous at ./task.jl:84
> unknown function (ip: 1742033888)
> unknown function (ip: 0)
> [1] 14452 segmentation fault (core dumped) julia -f
> ```
>
> Hmmm.
>
>
> On Sat, Jun 6, 2015 at 2:22 PM, andrew cooke <[email protected]
> <javascript:>> wrote:
> >
> > isn't that about repeated use of the same type implying that the
> "actual"
> > type is the intersection fo the two uses?
> >
> > i only use the type once.
> >
> > but really, i don't have a clue. if no-one else answers in a while,
> > i'llpost a message there asking.
> >
> > thanks,
> > andrew
> >
> >
> > On Saturday, 6 June 2015 15:17:39 UTC-3, Yichao Yu wrote:
> >>
> >> On Sat, Jun 6, 2015 at 2:15 PM, andrew cooke <[email protected]>
> wrote:
> >> >
> >> > Does this make sense to anyone? In 0.3 it works as (I) expected
> (once
> >> > you
> >> > change Void to Nothing).
> >> >
> >> > In 0.4 I have no idea what the float / circular reference thing is.
> >> >
> >> > _ _ _(_)_ | A fresh approach to technical computing
> >> > (_) | (_) (_) | Documentation: http://docs.julialang.org
> >> > _ _ _| |_ __ _ | Type "help()" for help.
> >> > | | | | | | |/ _` | |
> >> > | | |_| | | | (_| | | Version 0.4.0-dev+5232 (2015-06-06 11:26
> UTC)
> >> > _/ |\__'_|_|_|\__'_| | Commit 37ff0df* (0 days old master)
> >> > |__/ | x86_64-suse-linux
> >> >
> >> > julia> abstract C{T<:Union(Void,Int)}
> >> >
> >> > julia> type D{T}<:C{T} d::T end
> >> >
> >> > julia> D(nothing)
> >> > D{Void}(nothing)
> >> >
> >> > julia> D(1)
> >> > D{Int64}(1)
> >> >
> >> > julia> D(1.1)
> >> > D{Float64}(D{Float64}(#= circular reference =#))
> >>
> >> Related to https://github.com/JuliaLang/julia/issues/11597 ?
> >>
> >> >
> >> > (It's not a problem for me; just thought it odd)
> >> >
> >> > Andrew
>