File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -888,7 +888,7 @@ class Namer { typer: Typer =>
888
888
val unsafeInfo = if (isDerived) rhsBodyType else abstracted(rhsBodyType)
889
889
890
890
def opaqueToBounds (info : Type ): Type =
891
- if sym.isOpaqueAlias && tparamSyms.isEmpty && info.typeParams.nonEmpty then
891
+ if sym.isOpaqueAlias && info.typeParams.nonEmpty then
892
892
report.error(em " opaque type alias must be fully applied " , rhs.srcPos)
893
893
sym.opaqueToBounds(info, rhs1, tparamSyms)
894
894
Original file line number Diff line number Diff line change
1
+ trait Two [A , B ]
2
+
3
+ opaque type U [A ] = [B ] =>> Two [A , B ] // error: opaque type alias must be fully applied // error: cannot instantiate
4
+ opaque type T [A ] = [B ] =>> String // error: opaque type alias must be fully applied
5
+ opaque type S = [B ] =>> String // error: opaque type alias must be fully applied
6
+
You can’t perform that action at this time.
0 commit comments