Skip to content
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

Move sound problems doc out of guides/ directory #6264

Merged
merged 7 commits into from
Dec 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -210,11 +210,12 @@
{ "source": "/googleapis", "destination": "https://github.com/dart-lang/googleapis", "type": 301 },
{ "source": "/guides/get-started", "destination": "/overview", "type": 301 },
{ "source": "/guides/google-apis", "destination": "/resources/google-apis", "type": 301 },
{ "source": "/guides/language", "destination": "/language", "type": 301 },
{ "source": "/guides/language/analysis-options", "destination": "/tools/analysis", "type": 301 },
{ "source": "/guides/language/cheatsheet", "destination": "/language", "type": 301 },
{ "source": "/guides/language/coming-from/js-to-dart", "destination": "/resources/coming-from/js-to-dart", "type": 301 },
{ "source": "/guides/language/coming-from/swift-to-dart", "destination": "/resources/coming-from/swift-to-dart", "type": 301 },
{ "source": "/guides/language/common-prob", "destination": "/guides/language/sound-problems", "type": 301 },
{ "source": "/guides/language/common-prob", "destination": "/deprecated/sound-problems", "type": 301 },
{ "source": "/guides/language/concurrency", "destination": "/language/concurrency", "type": 301 },
{ "source": "/guides/language/effective-dart", "destination": "/effective-dart", "type": 301 },
{ "source": "/guides/language/effective-dart/:page*", "destination": "/effective-dart/:page*", "type": 301 },
@@ -226,10 +227,12 @@
{ "source": "/guides/language/numbers", "destination": "/resources/language/number-representation", "type": 301 },
{ "source": "/guides/language/sound-dart", "destination": "/language/type-system", "type": 301 },
{ "source": "/guides/language/sound-faq", "destination": "/language/type-system", "type": 301 },
{ "source": "/guides/language/sound-problems", "destination": "/deprecated/sound-problems", "type": 301 },
{ "source": "/guides/language/spec", "destination": "/resources/language/spec", "type": 301 },
{ "source": "/guides/language/specifications", "destination": "/resources/language/spec", "type": 301 },
{ "source": "/guides/language/specifications/:page*", "destination": "/resources/language/spec/versions/:page*", "type": 301 },
{ "source": "/guides/language/type-system", "destination": "/language/type-system", "type": 301 },
{ "source": "/guides/language/**", "destination": "/language", "type": 301 },
{ "source": "/guides/libraries", "destination": "/libraries", "type": 301 },
{ "source": "/guides/libraries/create-library-packages", "destination": "/tools/pub/create-packages", "type": 301 },
{ "source": "/guides/libraries/create-packages", "destination": "/tools/pub/create-packages", "type": 301 },
@@ -263,7 +266,7 @@
{ "source": "/keyword/class", "destination": "/language/classes#instance-variables", "type": 301 },
{ "source": "/keyword/const", "destination": "/language/variables#final-and-const", "type": 301 },
{ "source": "/keyword/continue", "destination": "/language/loops#break-and-continue", "type": 301 },
{ "source": "/keyword/covariant", "destination": "/guides/language/sound-problems#the-covariant-keyword", "type": 301 },
{ "source": "/keyword/covariant", "destination": "/deprecated/sound-problems#the-covariant-keyword", "type": 301 },
{ "source": "/keyword/default", "destination": "/language/branches#switch", "type": 301 },
{ "source": "/keyword/deferred", "destination": "/language/libraries#lazily-loading-a-library", "type": 301 },
{ "source": "/keyword/do", "destination": "/language/loops#while-and-do-while", "type": 301 },
2 changes: 1 addition & 1 deletion src/_data/glossary.yml
Original file line number Diff line number Diff line change
@@ -614,7 +614,7 @@
- text: "Covariance and contravariance"
link: "https://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)"
- text: "The covariant keyword"
link: "/guides/language/sound-problems#the-covariant-keyword"
link: "/deprecated/sound-problems#the-covariant-keyword"
labels:
- "language"
- "type system"
2 changes: 1 addition & 1 deletion src/_data/keywords.yml
Original file line number Diff line number Diff line change
@@ -35,7 +35,7 @@
link: /language/loops#break-and-continue
type: reserved
- term: 'covariant'
link: /guides/language/sound-problems#the-covariant-keyword
link: /deprecated/sound-problems#the-covariant-keyword
type: bit
- term: 'default'
link: /language/branches#switch
2 changes: 1 addition & 1 deletion src/_data/side-nav.yml
Original file line number Diff line number Diff line change
@@ -327,7 +327,7 @@
- title: Customizing static analysis
permalink: /tools/analysis
- title: Fixing common type problems
permalink: /guides/language/sound-problems
permalink: /deprecated/sound-problems
- title: Fixing type promotion failures
permalink: /tools/non-promotion-reasons
- title: Linter rules
2 changes: 1 addition & 1 deletion src/_includes/navigation-main.html
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@
</li>
<li class="mainnav__get-started">
<a href="/guides" class="nav-link
{%- if page_url_path contains '/*/guides/' or page_url_path contains '/*/language/' or page_url_path contains '/*/resources/' or page_url_path contains '/*/codelabs/' or page_url_path contains '/*/samples/' or page_url_path contains '/*/tools/' or page_url_path contains '/*/tutorials/' or page_url_path contains '/*/server/' or page_url_path contains '/*/web/' or page_url_path contains '/*/effective-dart/' or page_url_path contains '/*/libraries/' %} active {%- endif -%}">
{%- if page_url_path contains '/*/guides/' or page_url_path contains '/*/language/' or page_url_path contains '/*/resources/' or page_url_path contains '/*/codelabs/' or page_url_path contains '/*/deprecated/' or page_url_path contains '/*/tools/' or page_url_path contains '/*/tutorials/' or page_url_path contains '/*/server/' or page_url_path contains '/*/web/' or page_url_path contains '/*/effective-dart/' or page_url_path contains '/*/libraries/' %} active {%- endif -%}">
<span>Docs</span>
</a>
</li>
File renamed without changes.
37 changes: 0 additions & 37 deletions src/content/guides/language/index.md

This file was deleted.

2 changes: 1 addition & 1 deletion src/content/language/extend.md
Original file line number Diff line number Diff line change
@@ -78,7 +78,7 @@ it's similar to a downcast in that it can cause a type error at runtime.
Still, narrowing the type is possible
if the code can guarantee that a type error won't occur.
In this case, you can use the
[`covariant` keyword](/guides/language/sound-problems#the-covariant-keyword)
[`covariant` keyword](/deprecated/sound-problems#the-covariant-keyword)
in a parameter declaration.
For details, see the
[Dart language specification][].
4 changes: 2 additions & 2 deletions src/content/language/type-system.md
Original file line number Diff line number Diff line change
@@ -179,7 +179,7 @@ subtype of the original parameter.

:::note
If you have a valid reason to use a subtype, you can use the
[`covariant` keyword](/guides/language/sound-problems#the-covariant-keyword).
[`covariant` keyword](/deprecated/sound-problems#the-covariant-keyword).
:::

Consider the `chase(Animal)` method for the `Animal` class:
@@ -488,7 +488,7 @@ and [Use sound parameter types when overriding methods](#use-proper-param-types)

The following resources have further information on sound Dart:

* [Fixing common type problems](/guides/language/sound-problems) -
* [Fixing common type problems](/deprecated/sound-problems) -
Errors you may encounter when writing sound Dart code, and how to fix them.
* [Fixing type promotion failures](/tools/non-promotion-reasons) -
Understand and learn how to fix type promotion errors.
2 changes: 1 addition & 1 deletion src/content/resources/coming-from/js-to-dart.md
Original file line number Diff line number Diff line change
@@ -122,7 +122,7 @@ consider themselves as equal.
:::

[Built-in types]: /language/built-in-types
[Dart Language Tour]: /guides/language
[Dart Language Tour]: /language

For example:
The equals operator `==` and the `identical()` method return `true`
2 changes: 1 addition & 1 deletion src/content/resources/whats-new.md
Original file line number Diff line number Diff line change
@@ -548,7 +548,7 @@ we made the following changes to this site:
* Added a section on customizing [`dart fix`][].

[Objective-C and Swift interop]: /interop/objective-c-interop
[Fixing common type problems]: /guides/language/sound-problems
[Fixing common type problems]: /deprecated/sound-problems
[What not to commit]: /tools/pub/private-files
[`dart pub get` Options]: /tools/pub/cmd/pub-get#options
[`dart compile`]: /tools/dart-compile