Files
kotlin-fork/compiler/testData/diagnostics/tests
Alexander Udalov 7c90fbe4de Compute return type for property getters more safely
Do not call `isError()` on property's type right after creation of
PropertyGetterDescriptor because the property has no getter yet (it's created
but not yet stored to the property, that happens a bit later), and `isError()`
leads to computation of the delegate type, which for delegated properties
performs some complex resolution (see `VariableTypeResolver#process`) which
relies on the fact that the property already has a getter.

Since the purpose of the original change (883e2e4d) was to support a quick fix
which would add the type to a property in an expression like "val x get() =
...", check the type (or initializer) presence in the PSI instead, this is
safer and is still suitable for the quick fix.

Also fix arguments to "wrong getter type" diagnostic: previously something
useless like "expected Int, actual Int" was reported

 #KT-11809 Fixed
2016-04-07 15:35:58 +03:00
..
2015-10-07 15:50:23 +03:00
2015-10-07 15:50:23 +03:00
2015-10-14 01:29:10 +03:00
2015-10-14 01:29:10 +03:00
2015-09-25 19:20:20 +03:00
2015-10-14 01:29:10 +03:00
2015-10-07 21:56:07 +03:00
2015-10-14 20:51:01 +03:00
2015-10-16 22:19:33 +03:00
2015-10-19 20:45:00 +03:00