Change "most specific return type" definition for fake overrides.
Given overridden descriptors D = d[i]. 1. Find D*, subset of D: returnType(d* from D*) <: returnType(d) for each d from D. Always prefer var to val. 2. Prefer non-flexible return type to flexible. Check for var/val overrides properly (NB: this will report PROPERTY_TYPE_MISMATCH_ON_OVERRIDE for all properties, not just overrides involving vars as it was before).
This commit is contained in:
+1
-1
@@ -7,7 +7,7 @@ interface A {
|
||||
}
|
||||
|
||||
class AImpl: A {
|
||||
override val <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>prop<!> by Delegate()
|
||||
override val <!PROPERTY_TYPE_MISMATCH_ON_OVERRIDE!>prop<!> by Delegate()
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
|
||||
Reference in New Issue
Block a user