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

Docgen doesn't render field types in generics with when #18614

Closed
add-IV opened this issue Jul 29, 2021 · 2 comments
Closed

Docgen doesn't render field types in generics with when #18614

add-IV opened this issue Jul 29, 2021 · 2 comments
Labels
Documentation Generation Related to documentation generation (but not content).

Comments

@add-IV
Copy link

add-IV commented Jul 29, 2021

Docgen on Options Library is missing field types

https://nim-lang.org/docs/options.html#7

expected:

type
  Option[T] = object
    when T is SomePointer:
      val: T
    else:
      val: T
      has: bool

current:

Option[T] = object
  when T is SomePointer:
    val
  else:
      val
      has
@timotheecour
Copy link
Member

same problem since at least 1.0

type Option1* = object
    val0: int
    when true:
      val: int
    else:
      val: float

type Option2* = object
    val0: int
    when true:
      val: int
    else:
      val: float

type Option3*[T] = object
    val0: int
    when true:
      val: int
    else:
      val: float

1, 2 work, 3 fails

image

@timotheecour timotheecour added the Documentation Generation Related to documentation generation (but not content). label Jul 30, 2021
@timotheecour timotheecour changed the title Docgen doesn't work as expected on Standart Library/ Options Docgen doesn't render field types in generics with when Jul 30, 2021
@ringabout
Copy link
Member

ringabout commented Aug 1, 2021

duplicated of #9899

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Generation Related to documentation generation (but not content).
Projects
None yet
Development

No branches or pull requests

3 participants