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.
Precise
1 parent 4ccc7d8 commit da5b035Copy full SHA for da5b035
compiler/src/dotty/tools/dotc/core/ConstraintHandling.scala
@@ -647,7 +647,8 @@ trait ConstraintHandling {
647
case _ => isSubTypeWhenFrozen(tp, defn.SingletonType)
648
649
val wideInst =
650
- if isSingleton(bound) then inst
+ //keeping the precise type if the bound is Singleton or precise or the mode is precise
651
+ if isSingleton(bound) || ctx.mode.is(Mode.Precise) || bound.isPrecise then inst
652
else dropTransparentTraits(widenIrreducible(widenOr(widenSingle(inst))), bound)
653
wideInst match
654
case wideInst: TypeRef if wideInst.symbol.is(Module) =>
0 commit comments