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:
Pavel V. Talanov
2012-07-20 16:11:16 +04:00
parent d262d06f2d
commit d65b6bc69f
2 changed files with 15 additions and 12 deletions
@@ -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
}
}
*/