Skip to content

Commit 8b5f2da

Browse files
committed
address feedback
1 parent 7377ee3 commit 8b5f2da

File tree

4 files changed

+8
-23
lines changed

4 files changed

+8
-23
lines changed

compiler/test/dotty/tools/dotc/CompilationTests.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ class CompilationTests {
5252
compileFile("tests/pos-special/notNull.scala", defaultOptions.and("-Yexplicit-nulls")),
5353
compileDir("tests/pos-special/adhoc-extension", defaultOptions.and("-source", "3.1", "-feature", "-Xfatal-warnings")),
5454
compileFile("tests/pos-special/i7575.scala", defaultOptions.andLanguageFeature("dynamics")),
55-
compileFile("tests/pos-special/i10511-transitivity.scala", defaultOptions), // avoid pickling test
5655
compileFile("tests/pos-special/kind-projector.scala", defaultOptions.and("-Ykind-projector")),
5756
compileFile("tests/run/i5606.scala", defaultOptions.and("-Yretain-trees")),
5857
compileFile("tests/pos-custom-args/i5498-postfixOps.scala", defaultOptions withoutLanguageFeature "postfixOps"),

docs/docs/reference/new-types/match-types.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Recursive match type definitions can also be given an upper bound, like this:
4848

4949
```scala
5050
type Concat[Xs <: Tuple, +Ys <: Tuple] <: Tuple = Xs match
51-
case Unit => Ys
51+
case EmptyTuple => Ys
5252
case x *: xs => x *: Concat[xs, Ys]
5353
```
5454

@@ -126,6 +126,7 @@ Disjointness proofs rely on the following properties of Scala types:
126126
1. Single inheritance of classes
127127
2. Final classes cannot be extended
128128
3. Constant types with distinct values are nonintersecting
129+
4. Singleton paths to distinct values are nonintersecting, such as `object` definitions or singleton enum cases.
129130

130131
Type parameters in patterns are minimally instantiated when computing `S <: Pi`.
131132
An instantiation `Is` is _minimal_ for `Xs` if all type variables in `Xs` that
@@ -240,4 +241,3 @@ main differences here are:
240241
whereas match types also work for type parameters and abstract types.
241242
- Match types support direct recursion.
242243
- Conditional types distribute through union types.
243-

tests/pos-special/i10511-transitivity.scala

Lines changed: 0 additions & 20 deletions
This file was deleted.

tests/pos/i10511.scala

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,9 @@ val t: True.type = True
1414
val f: False.type = False
1515

1616
val g: Not[False.type] = t
17+
18+
val t1: Not[f.type] = t // transitivity
19+
val f1: Not[t.type] = f // transitivity
20+
21+
val t2: Not[f1.type] = t1 // transitivity x2
22+
val f2: Not[t1.type] = f1 // transitivity x2

0 commit comments

Comments
 (0)