Fix PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL diagnostic in new inference

This commit is contained in:
Dmitriy Novozhilov
2019-01-18 14:40:17 +03:00
parent 090c2998d2
commit 2da3366a47
4 changed files with 7 additions and 7 deletions
@@ -55,7 +55,7 @@ object ProtectedConstructorCallChecker : CallChecker {
// And without ProtectedConstructorCallChecker such calls would be allowed only because they are performed within subclass
// of constructor owner
@Suppress("DEPRECATION")
if (Visibilities.findInvisibleMember(Visibilities.FALSE_IF_PROTECTED, descriptor, scopeOwner) == actualConstructor) {
if (Visibilities.findInvisibleMember(Visibilities.FALSE_IF_PROTECTED, descriptor, scopeOwner) == actualConstructor.original) {
context.trace.report(Errors.PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL.on(reportOn, descriptor))
}
}