Julia: Help regression for Rational in 0.6

Created on 22 Apr 2017  路  3Comments  路  Source: JuliaLang/julia

In Julia 0.5:

help?> Rational
search: Rational rationalize Irrational SerializationState permutations

  No documentation found.

  Summary:

  immutable Rational{T<:Integer} <: Real

  Fields:

  num :: T<:Integer
  den :: T<:Integer

while in Julia 0.6

help?> Rational
search: Rational rationalize Irrational SerializationState Factorization

  No documentation found.

  Base.Rational is of type UnionAll.

  Summary:

  struct UnionAll <: Type{T}

  Fields:

  var  :: TypeVar
  body :: Any

The details in 0.6 are wrong:

julia> Rational <: UnionAll
false

julia> fieldnames(Rational)
2-element Array{Symbol,1}:
 :num
 :den

Most helpful comment

Maybe Rational should just be documented...

All 3 comments

What the doc is actually saying is that

julia> isa(Rational, UnionAll)
true

Not that it's particularly useful/unconfusing...

See #21029.

Maybe Rational should just be documented...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sbromberger picture sbromberger  路  3Comments

thofma picture thofma  路  3Comments

i-apellaniz picture i-apellaniz  路  3Comments

yurivish picture yurivish  路  3Comments

iamed2 picture iamed2  路  3Comments