File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1039,7 +1039,7 @@ class Namer { typer: Typer =>
1039
1039
val finalSelfInfo : TypeOrSymbol =
1040
1040
if (cls.isOpaqueCompanion) {
1041
1041
// The self type of an opaque companion is refined with the type-alias of the original opaque type
1042
- def refineOpaqueCompanionSelfType (mt : Type , stats : List [Tree ]): RefinedType = (stats : @ unchecked) match {
1042
+ def refineOpaqueCompanionSelfType (mt : Type , stats : List [Tree ]): Type = (stats : @ unchecked) match {
1043
1043
case (td @ TypeDef (localName, rhs)) :: _
1044
1044
if td.mods.is(SyntheticOpaque ) && localName == name.stripModuleClassSuffix =>
1045
1045
// create a context owned by the current opaque helper symbol,
@@ -1053,6 +1053,8 @@ class Namer { typer: Typer =>
1053
1053
RefinedType (mt, localName, bounds)
1054
1054
case _ :: stats1 =>
1055
1055
refineOpaqueCompanionSelfType(mt, stats1)
1056
+ case _ =>
1057
+ mt // can happen for malformed inputs.
1056
1058
}
1057
1059
selfInfo match {
1058
1060
case self : Type =>
Original file line number Diff line number Diff line change
1
+ opaque object
2
+ // error
You can’t perform that action at this time.
0 commit comments