dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.3k stars 1.59k forks source link

Doc should have examples for equality operator #23530

Open floitschG opened 9 years ago

floitschG commented 9 years ago

Given the complexities of overriding the equality operator (see [0]), the docs should have correct examples of how to override the operator. Both the "Idiomatic Dart" [1] and the dartdoc [2] don't provide examples.

[0] http://work.j832.com/2014/05/equality-and-dart.html [1] https://www.dartlang.org/articles/idiomatic-dart/#equality [2] https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:core.Object#id_==

lrhn commented 9 years ago

Removed Type-Defect label. Added Type-Documentation label.