-
Notifications
You must be signed in to change notification settings - Fork 717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Document covariant
elsewhere then retire "Fixing common type problems" page
#6265
Comments
\cc @MaryaBelanger Any thoughts on where we can/should document the Perhaps https://dart.dev/language/type-system#methods and/or on https://dart.dev/language/methods? The existing location has been outside of the normal language docs, resulting in people often not knowing the keyword exists. This is perhaps partially intentional as it moves a static error to runtime. So wherever we move it, perhaps a warning is needed alongside? |
- Move the sound-problems doc to the deprecated directory, as most of it is duplicated with diagnostic message docs. See #6265 for follow up work. - Delete the `/guides/language` index as it's not linked to from anywhere and mostly duplicates introductions from other pages. Contributes to #5767 Contributes to #6265
It seems like Runtime errors can move to the types system page too, under Runtime checks. What do you think? It can almost replace the existing section 1:1 (though I'd try to shorten it a bit, remove the "Fix: ..." section header, etc). Edit: It's a little more involved than that; seems like the Type inference section that follows Runtime checks on the Type system page repeats a lot of information from the Sound problems section. I think it should still move to the Type system page, but we'll have to be more intentional than just copy-pasting the whole thing (especially in the Type argument inference subsection, seems like a lot of that in the same as the "Fix" section under Runtime errors) |
Adds a section about implicit cast runtime errors to the "Type system" page, based off the [Invalid casts section](https://dart.dev/deprecated/sound-problems#invalid-casts) of the deprecated sound problems page. Contributes to #6265 --------- Co-authored-by: Erik Ernst <[email protected]>
Still relevant docs have been moved to other pages, including [The Dart type system](https://dart.dev/language/type-system), [Diagnostic messages](https://dart.dev/tools/diagnostic-messages), [Fixing type promotion failures](https://dart.dev/tools/non-promotion-reasons), and the [Glossary](https://dart.dev/resources/glossary). This PR removes the page now that the important topics are covered elsewhere and redirects links to the page to the type system page, which we plan to continue to expand and improve (#4745). Resolves #6265 Resolves #2579 _(by making it obsolete)_ Resolves #4393
Page: https://dart.dev/guides/language/sound-problems#the-covariant-keyword
Source: https://github.com/dart-lang/site-www/blob/main/src/content/guides/language/sound-problems.md
The page was introduced in the context of sound Dart being new and before the diagnostic messages were well documented. Now the warnings documented here (and many more) have consistent documentation on the Diagnostic messages page.
The only parts not covered by that page is the section on runtime errors and the
covariant
keyword. These docs need a new home before retiring the page, or at least thecovariant
docs do. That probably belongs in the language docs anyway.The text was updated successfully, but these errors were encountered: