File tree Expand file tree Collapse file tree 3 files changed +5
-0
lines changed
compiler/src/dotty/tools/dotc/typer
docs/_docs/reference/other-new-features Expand file tree Collapse file tree 3 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -537,6 +537,7 @@ object Checking {
537
537
checkCombination(Private , Protected )
538
538
checkCombination(Abstract , Override )
539
539
checkCombination(Private , Override )
540
+ checkCombination(Private , Opaque )
540
541
checkCombination(Lazy , Inline )
541
542
// The issue with `erased inline` is that the erased semantics get lost
542
543
// as the code is inlined and the reference is removed before the erased usage check.
Original file line number Diff line number Diff line change @@ -51,6 +51,8 @@ object o:
51
51
def id (x : o.T ): o.T = x
52
52
```
53
53
54
+ Opaque type aliases cannot be ` private ` and cannot overridden in subclasses.
55
+
54
56
## Type Parameters of Opaque Types
55
57
56
58
Opaque type aliases can have a single type parameter list. The following aliases
Original file line number Diff line number Diff line change
1
+ class Bar :
2
+ private opaque type Baz = Int // error
You can’t perform that action at this time.
0 commit comments