Skip to content

Documentation for functions in enums are linked but not generated #3584

Closed
@mkorbel1

Description

@mkorbel1

If you define an enum with a function in it, then the documentation page for that enum will have a link to a documentation page about that function (and even the doc comment for the function), however the page for the function will be missing.

In addition, since the target of the link is missing, --validate-links will trigger a warning. This was annoying to debug because of #3331. I had to run this repo in debug mode and add print statements to figure out what was missing since I didn't know what the warning was.

To reproduce, create an enum with a static function in it, for example:

enum MyEnum {
  a,
  b,
  c;

  /// Says hello!
  static void myFunction() {
    print("hello");
  }
}

The generated documentation will include MyEnum and a link to myFunction, as expected, however the link (circled) will be dead because the doc page for myFunction is not generated.

image

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failurestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions