Skip to content

Commit db9076e

Browse files
committed
preserves opaque types when widening singletons, to keep extra precise information that the opaque may have. E.g.:
`opaque type Foo[@PRECISE T] = T`
1 parent 7ebeab9 commit db9076e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/core/Types.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1315,7 +1315,7 @@ object Types {
13151315
* and going to the operands of & and |.
13161316
* Overridden and cached in OrType.
13171317
*/
1318-
def widenSingletons(using Context): Type = dealias match {
1318+
def widenSingletons(using Context): Type = dealiasKeepOpaques match {
13191319
case tp: SingletonType =>
13201320
tp.widen
13211321
case tp: OrType =>

0 commit comments

Comments
 (0)