Skip to content

Update compiler message links. use docs.scala-lang.org #14948

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

Merged
merged 1 commit into from
Apr 15, 2022
Merged
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions compiler/src/dotty/tools/dotc/core/Definitions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2003,7 +2003,7 @@ class Definitions {
add(MatchableClass,
"""/** The base trait of types that can be safely pattern matched against.
| *
| * See [[https://dotty.epfl.ch/docs/reference/other-new-features/matchable.html]].
| * See [[https://docs.scala-lang.org/scala3/reference/other-new-features/matchable.html]].
| */
""".stripMargin)

Expand Down Expand Up @@ -2112,21 +2112,21 @@ class Definitions {
add(AnyKindClass,
"""/** The super-type of all types.
| *
| * See [[https://dotty.epfl.ch/docs/reference/other-new-features/kind-polymorphism.html]].
| * See [[https://docs.scala-lang.org/scala3/reference/other-new-features/kind-polymorphism.html]].
| */
""".stripMargin)

add(andType,
"""/** The intersection of two types.
| *
| * See [[https://dotty.epfl.ch/docs/reference/new-types/intersection-types.html]].
| * See [[https://docs.scala-lang.org/scala3/reference/new-types/intersection-types.html]].
| */
""".stripMargin)

add(orType,
"""/** The union of two types.
| *
| * See [[https://dotty.epfl.ch/docs/reference/new-types/union-types.html]].
| * See [[https://docs.scala-lang.org/scala3/reference/new-types/union-types.html]].
| */
""".stripMargin)

Expand Down
4 changes: 2 additions & 2 deletions compiler/src/dotty/tools/dotc/typer/Typer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3674,14 +3674,14 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
tree.symbol != defn.StringContext_f &&
tree.symbol != defn.StringContext_s)
if (ctx.settings.XignoreScala2Macros.value) {
report.warning("Scala 2 macro cannot be used in Dotty, this call will crash at runtime. See https://dotty.epfl.ch/docs/reference/dropped-features/macros.html", tree.srcPos.startPos)
report.warning("Scala 2 macro cannot be used in Dotty, this call will crash at runtime. See https://docs.scala-lang.org/scala3/reference/dropped-features/macros.html", tree.srcPos.startPos)
Throw(New(defn.MatchErrorClass.typeRef, Literal(Constant(s"Reached unexpanded Scala 2 macro call to ${tree.symbol.showFullName} compiled with -Xignore-scala2-macros.")) :: Nil))
.withType(tree.tpe)
.withSpan(tree.span)
}
else {
report.error(
"""Scala 2 macro cannot be used in Dotty. See https://dotty.epfl.ch/docs/reference/dropped-features/macros.html
"""Scala 2 macro cannot be used in Dotty. See https://docs.scala-lang.org/scala3/reference/dropped-features/macros.html
|To turn this error into a warning, pass -Xignore-scala2-macros to the compiler""".stripMargin, tree.srcPos.startPos)
tree
}
Expand Down
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class VarianceChecker(using Context) {
val towner = tvar.owner
if towner.isAllOf(EnumCase) && towner.isClass && tvar.is(Synthetic) then
val example =
"See an example at http://dotty.epfl.ch/docs/reference/enums/adts.html#parameter-variance-of-enums"
"See an example at https://docs.scala-lang.org/scala3/reference/enums/adts.html#parameter-variance-of-enums"
i"\n${hl("enum case")} ${towner.name} requires explicit declaration of $tvar to resolve this issue.\n$example"
else
""
Expand Down
6 changes: 3 additions & 3 deletions tests/neg-custom-args/fatal-warnings/enum-variance.check
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
-- Error: tests/neg-custom-args/fatal-warnings/enum-variance.scala:2:12 ------------------------------------------------
2 | case Refl(f: T => T) // error: enum case Refl requires explicit declaration of type T
| ^^^^^^^^^
| contravariant type T occurs in covariant position in type T => T of value f
| enum case Refl requires explicit declaration of type T to resolve this issue.
| See an example at http://dotty.epfl.ch/docs/reference/enums/adts.html#parameter-variance-of-enums
| contravariant type T occurs in covariant position in type T => T of value f
| enum case Refl requires explicit declaration of type T to resolve this issue.
| See an example at https://docs.scala-lang.org/scala3/reference/enums/adts.html#parameter-variance-of-enums
-- Error: tests/neg-custom-args/fatal-warnings/enum-variance.scala:5:16 ------------------------------------------------
5 | case Refl[-T](f: T => T) extends ExplicitView[T] // error: contravariant type T occurs in covariant position
| ^^^^^^^^^
Expand Down