Swap arguments for diagnostic message about incompatible enums

This commit is restoring previous behavior changed in c4b69b65 and
 fixing `DiagnosticMessageTestGenerated.testIncompatibleEnums` test
This commit is contained in:
Mikhail Zarechenskiy
2019-03-06 10:42:04 +03:00
parent 3315c1c35b
commit 88ee0bf6af
@@ -684,7 +684,7 @@ class PatternMatchingTypingVisitor internal constructor(facade: ExpressionTyping
return
}
checkEnumsForCompatibility(context, reportErrorOn, type, subjectType)
checkEnumsForCompatibility(context, reportErrorOn, subjectType, type)
// check if the pattern is essentially a 'null' expression
if (KotlinBuiltIns.isNullableNothing(type) && !TypeUtils.isNullableType(subjectType)) {