Skip to content

dart:io APPEND field should be marked as const in Dart API Spec #1576

Closed
@floitschG

Description

@floitschG

From @iarkh on December 20, 2017 4:30

dart:io APPEND Spec reads:

APPEND = FileMode.APPEND
The mode for opening a file for reading and writing to the end of it. The file is created if it does not already exist.

It should be marked as const because actually it's a constant and cannot be changed.
So, description should look loke one for FileMode.APPEND field:
dynamic APPEND = **const** FileMode._internal(2)
See here: https://api.dartlang.org/stable/1.24.3/dart-io/APPEND-constant.html

Some other fields from dart:io Constants section in the Spec are also not marked const: READ, WRITE, WRITE_ONLY, WRITE_ONLY_APPEND.

Copied from original issue: dart-lang/sdk#31697

Metadata

Metadata

Assignees

Labels

P2A bug or feature request we're likely to work ontype-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