Skip to content

Commit 9cb9455

Browse files
committed
Applied review comments
Updated test check files and Markdown syntax used in Scaladoc
1 parent 28067e0 commit 9cb9455

File tree

2 files changed

+10
-13
lines changed

2 files changed

+10
-13
lines changed

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3471,11 +3471,8 @@ object Types {
34713471
}
34723472

34733473
/** Returns the set of non-union (leaf) types composing this union tree with Nothing types
3474-
* absorbed by other types, if present.
3475-
* For example:
3476-
* {{{A | B | C | B | (A & (B | C)) | Nothing}}}
3477-
* returns
3478-
* {{{Set(A, B, C, (A & (B | C)))}}}
3474+
* absorbed by other types, if present. For example:<br>
3475+
* `(A | B | C | B | (A & (B | C)) | Nothing)` returns `Set(A, B, C, (A & (B | C)))`.
34793476
*/
34803477
private def gatherTreeUniqueMembersAbsorbingNothingTypes(using Context): Set[Type] = {
34813478
(tp1, tp2) match

tests/printing/i10693.check

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
[[syntax trees at end of typer]] // tests/printing/i10693.scala
22
package <empty> {
33
final lazy module val i10693$package: i10693$package = new i10693$package()
4-
final module class i10693$package() extends Object() {
4+
final module class i10693$package() extends Object() {
55
this: i10693$package.type =>
66
def test[A >: Nothing <: Any, B >: Nothing <: Any](a: A, b: B): A | B = a
77
val v0: String | Int = test[String, Int]("string", 1)
88
val v1: Int | String = test[Int, String](1, "string")
9-
val v2: String | Int = test[(String | Int), (Int | String)](v0, v1)
10-
val v3: Int | String = test[(Int | String), (String | Int)](v1, v0)
11-
val v4: String | Int = test[(String | Int), (Int | String)](v2, v3)
12-
val v5: Int | String = test[(Int | String), (String | Int)](v3, v2)
13-
val v6: String | Int = test[(String | Int), (Int | String)](v4, v5)
9+
val v2: String | Int = test[String | Int, Int | String](v0, v1)
10+
val v3: Int | String = test[Int | String, String | Int](v1, v0)
11+
val v4: String | Int = test[String | Int, Int | String](v2, v3)
12+
val v5: Int | String = test[Int | String, String | Int](v3, v2)
13+
val v6: String | Int = test[String | Int, Int | String](v4, v5)
1414
val t0: List[Int] = Tuple1.apply[Int](1).toList
1515
val t1: List[Int] = Tuple2.apply[Int, Int](1, 2).toList
1616
val t2: List[Int] = Tuple3.apply[Int, Int, Int](1, 2, 3).toList
17-
val t3: List[Int | String] =
17+
val t3: List[Int | String] =
1818
Tuple3.apply[String, Int, Int]("A", 2, 3).toList
19-
val t4: List[String | Int] =
19+
val t4: List[String | Int] =
2020
Tuple3.apply[Int, String, String](1, "B", "C").toList
2121
}
2222
}

0 commit comments

Comments
 (0)