We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent aed0f78 commit b6d815eCopy full SHA for b6d815e
compiler/src/dotty/tools/dotc/typer/Checking.scala
@@ -537,7 +537,7 @@ object Checking {
537
checkCombination(Private, Protected)
538
checkCombination(Abstract, Override)
539
checkCombination(Private, Override)
540
- checkCombination(Private, Opaque)
+ if sym.isType && !sym.isClass then checkCombination(Private, Opaque)
541
checkCombination(Lazy, Inline)
542
// The issue with `erased inline` is that the erased semantics get lost
543
// as the code is inlined and the reference is removed before the erased usage check.
tests/neg/i14660.scala
@@ -1,2 +1,8 @@
1
class Bar:
2
private opaque type Baz = Int // error
3
+
4
+ private object Foo:
5
+ opaque type O = Int // OK
6
7
+ val x: Baz = 1
8
0 commit comments