KT-2472: Wrong "multiple implementations inherited" diagnostics for JFrame.
Check whether member is visible when creating fake overrides. #KT-2472 Fixed
This commit is contained in:
@@ -190,18 +190,22 @@ public class OverrideResolver {
|
||||
OverridingUtil.OverrideCompatibilityInfo.Result result =
|
||||
OverridingUtil.isOverridableBy(fromSupertype, fromCurrent).getResult();
|
||||
|
||||
if (Visibilities.isVisible(fromSupertype, current)) {
|
||||
switch (result) {
|
||||
case OVERRIDABLE:
|
||||
boolean isVisible = Visibilities.isVisible(fromSupertype, current);
|
||||
switch (result) {
|
||||
case OVERRIDABLE:
|
||||
if (isVisible) {
|
||||
OverridingUtil.bindOverride(fromCurrent, fromSupertype);
|
||||
iterator.remove();
|
||||
break;
|
||||
case CONFLICT:
|
||||
}
|
||||
iterator.remove();
|
||||
break;
|
||||
case CONFLICT:
|
||||
if (isVisible) {
|
||||
sink.conflict(fromSupertype, fromCurrent);
|
||||
break;
|
||||
case INCOMPATIBLE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
iterator.remove();
|
||||
break;
|
||||
case INCOMPATIBLE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
package test
|
||||
|
||||
import javax.swing.JFrame
|
||||
/* waiting for KT-1725
|
||||
|
||||
class KFrame() : JFrame() {
|
||||
{
|
||||
val x = this.accessibleContext // make sure field is visible
|
||||
}
|
||||
}
|
||||
*/
|
||||
Reference in New Issue
Block a user