Skip to content

Commit 8037f3b

Browse files
authored
Merge pull request #14948 from xuwei-k/compiler-message-links
Update compiler message links. use `docs.scala-lang.org`
2 parents b398505 + f7f23b7 commit 8037f3b

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

compiler/src/dotty/tools/dotc/core/Definitions.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,7 +2003,7 @@ class Definitions {
20032003
add(MatchableClass,
20042004
"""/** The base trait of types that can be safely pattern matched against.
20052005
| *
2006-
| * See [[https://dotty.epfl.ch/docs/reference/other-new-features/matchable.html]].
2006+
| * See [[https://docs.scala-lang.org/scala3/reference/other-new-features/matchable.html]].
20072007
| */
20082008
""".stripMargin)
20092009

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

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

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

compiler/src/dotty/tools/dotc/typer/Typer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3674,14 +3674,14 @@ class Typer(@constructorOnly nestingLevel: Int = 0) extends Namer
36743674
tree.symbol != defn.StringContext_f &&
36753675
tree.symbol != defn.StringContext_s)
36763676
if (ctx.settings.XignoreScala2Macros.value) {
3677-
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)
3677+
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)
36783678
Throw(New(defn.MatchErrorClass.typeRef, Literal(Constant(s"Reached unexpanded Scala 2 macro call to ${tree.symbol.showFullName} compiled with -Xignore-scala2-macros.")) :: Nil))
36793679
.withType(tree.tpe)
36803680
.withSpan(tree.span)
36813681
}
36823682
else {
36833683
report.error(
3684-
"""Scala 2 macro cannot be used in Dotty. See https://dotty.epfl.ch/docs/reference/dropped-features/macros.html
3684+
"""Scala 2 macro cannot be used in Dotty. See https://docs.scala-lang.org/scala3/reference/dropped-features/macros.html
36853685
|To turn this error into a warning, pass -Xignore-scala2-macros to the compiler""".stripMargin, tree.srcPos.startPos)
36863686
tree
36873687
}

compiler/src/dotty/tools/dotc/typer/VarianceChecker.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ class VarianceChecker(using Context) {
171171
val towner = tvar.owner
172172
if towner.isAllOf(EnumCase) && towner.isClass && tvar.is(Synthetic) then
173173
val example =
174-
"See an example at http://dotty.epfl.ch/docs/reference/enums/adts.html#parameter-variance-of-enums"
174+
"See an example at https://docs.scala-lang.org/scala3/reference/enums/adts.html#parameter-variance-of-enums"
175175
i"\n${hl("enum case")} ${towner.name} requires explicit declaration of $tvar to resolve this issue.\n$example"
176176
else
177177
""

tests/neg-custom-args/fatal-warnings/enum-variance.check

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
-- Error: tests/neg-custom-args/fatal-warnings/enum-variance.scala:2:12 ------------------------------------------------
22
2 | case Refl(f: T => T) // error: enum case Refl requires explicit declaration of type T
33
| ^^^^^^^^^
4-
| contravariant type T occurs in covariant position in type T => T of value f
5-
| enum case Refl requires explicit declaration of type T to resolve this issue.
6-
| See an example at http://dotty.epfl.ch/docs/reference/enums/adts.html#parameter-variance-of-enums
4+
| contravariant type T occurs in covariant position in type T => T of value f
5+
| enum case Refl requires explicit declaration of type T to resolve this issue.
6+
| See an example at https://docs.scala-lang.org/scala3/reference/enums/adts.html#parameter-variance-of-enums
77
-- Error: tests/neg-custom-args/fatal-warnings/enum-variance.scala:5:16 ------------------------------------------------
88
5 | case Refl[-T](f: T => T) extends ExplicitView[T] // error: contravariant type T occurs in covariant position
99
| ^^^^^^^^^

0 commit comments

Comments
 (0)