FIR checker: report VIRTUAL_MEMBER_HIDDEN

This commit is contained in:
Tianyu Geng
2021-05-24 13:29:32 -07:00
committed by Mikhail Glukhikh
parent d3dfb33f89
commit 32f55a2269
30 changed files with 195 additions and 99 deletions
@@ -8,7 +8,7 @@ open class A {
class B : A() {
override fun foo(): B = this
fun bar(): B = this // Ambiguity, no override here (really it's just "missing override" and no ambiguity)
fun <!VIRTUAL_MEMBER_HIDDEN!>bar<!>(): B = this // Missing 'override'
override fun buz(p: B): B = this //No override as B not :> A
fun test() {
@@ -44,7 +44,7 @@ public <!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class LightClassWrapper<!> : Light(),
}
public abstract class Light : Field, TypeParametersOwner {
fun getTypeParameters() = listOf()
fun <!VIRTUAL_MEMBER_HIDDEN!>getTypeParameters<!>() = listOf()
}
public interface Field : Named
@@ -14,7 +14,7 @@ public class A {
class B : A() {
override fun foo(): B = this
fun bar(): B = this // Here we should have "missing override" but no ambiguity
fun <!VIRTUAL_MEMBER_HIDDEN!>bar<!>(): B = this // Here we should have "missing override" but no ambiguity
fun test() {
foo()