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 00034a2 commit e8c27daCopy full SHA for e8c27da
compiler/src/dotty/tools/dotc/core/Types.scala
@@ -3546,6 +3546,13 @@ object Types {
3546
def apply(tp: Type) = tp
3547
}
3548
3549
+ /** A type map that approximates NoTypes by upper or lower known bounds depending on
3550
+ * variance.
3551
+ *
3552
+ * if variance > 0 : approximate by upper bound
3553
+ * variance < 0 : approximate by lower bound
3554
+ * variance = 0 : propagate NoType to next outer level
3555
+ */
3556
abstract class ApproximatingTypeMap(implicit ctx: Context) extends TypeMap { thisMap =>
3557
def approx(lo: Type = defn.NothingType, hi: Type = defn.AnyType) =
3558
if (variance == 0) NoType
0 commit comments