diff options
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 1bc8f1646..e263cf076 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1376,6 +1376,11 @@ object Types { override def underlying(implicit ctx: Context) = parent + /** Does goves type match `refinedInfo`. Translates to a subtype check here, + * but is overridden in SelectionProto + */ + def matchesInfo(tp: Type)(implicit ctx: Context): Boolean = tp <:< refinedInfo + def derivedRefinedType(parent: Type, refinedName: Name, refinedInfo: Type)(implicit ctx: Context): RefinedType = { def originalName = parent.typeParams.apply(refinedName.hkParamIndex).name if ((parent eq this.parent) && (refinedName eq this.refinedName) && (refinedInfo eq this.refinedInfo)) |