Skip to content

dartfmt removes "?" in "()?" typed field #1224

Closed
@davidmorgan

Description

@davidmorgan

While adding records support to built_value I thought I'd check the base case, and it doesn't quite work as dartfmt eats the ? in the generated output.

> cat foo.dart
class A {
  ()? x;
}
dartfmt foo.dart
Hit a bug in the formatter when formatting foo.dart.
The formatter produced unexpected output. Input was:
class A {
  ()? x;
}

Which formatted to:
class A {
  () x;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions