Skip to content

Commit 189973b

Browse files
committed
Make MatchTypes value types
This allows to base more Tuple operations on types instead of rewrite terms
1 parent 0d4a118 commit 189973b

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
@@ -3538,7 +3538,7 @@ object Types {
35383538
*
35393539
* and `X_1,...X_n` are the type variables bound in `patternType`
35403540
*/
3541-
abstract case class MatchType(bound: Type, scrutinee: Type, cases: List[Type]) extends CachedProxyType with TermType {
3541+
abstract case class MatchType(bound: Type, scrutinee: Type, cases: List[Type]) extends CachedProxyType with ValueType {
35423542

35433543
def derivedMatchType(bound: Type, scrutinee: Type, cases: List[Type])(implicit ctx: Context) =
35443544
if (bound.eq(this.bound) && scrutinee.eq(this.scrutinee) && cases.eqElements(this.cases)) this

0 commit comments

Comments
 (0)