Skip to content

Doc generator: nullable signatures render as 'double left = null', 'CancellationToken cancellationToken = null' #269

@codemonkeychris

Description

@codemonkeychris

External API review flagged that several signatures render in the generated docs as nonsense like:

  • `double left = null`
  • `int selectedIndex = null`
  • `CancellationToken cancellationToken = null`

(seen at `omd.html:107, 590, 12287`)

Value types can't be `= null`, so the compiled signatures are presumably `double? left = null` / `int? selectedIndex = null` / `CancellationToken cancellationToken = default`, but the doc generator is dropping the `?` and/or rewriting `default` to `null`.

If that output is what consumers see, it undermines trust in the API even when the compiled signatures are correct. This looks like a doc-generator (omd.html) bug, not an API surface bug — but worth tracking.

Proposed fix: preserve `?` annotations on value-type parameters and render `= default` (or the actual default expression) faithfully in the generated doc HTML.

Source: external API consistency review, 2026-05.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions