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 {
537537 checkCombination(Private , Protected )
538538 checkCombination(Abstract , Override )
539539 checkCombination(Private , Override )
540+ checkCombination(Private , Opaque )
540541 checkCombination(Lazy , Inline )
541542 // The issue with `erased inline` is that the erased semantics get lost
542543 // 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:
5151def id (x : o.T ): o.T = x
5252```
5353
54+ Opaque type aliases cannot be ` private ` and cannot overridden in subclasses.
55+
5456## Type Parameters of Opaque Types
5557
5658Opaque 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