method references: remove code duplication in return type checks

This commit is contained in:
Anna Kozlova
2016-01-29 21:18:43 +03:00
parent 4838874a41
commit 70e66b80fb
6 changed files with 93 additions and 92 deletions

View File

@@ -26,7 +26,7 @@ class AlienTest {
static {
IInt i1 = MyTest::<error descr="Cannot resolve method 'abracadabra'">abracadabra</error>;
IInt i2 = <error descr="Bad return type in method reference: cannot convert void to int">MyTest::foo</error>;
IInt i2 = MyTest::<error descr="Invalid method reference: int cannot be converted to String">foo</error>;
IInt i3 = MyTest::<error descr="Cannot resolve method 'bar'">bar</error>;
<error descr="Incompatible types. Found: '<method reference>', required: 'AlienTest.IIntInt'">IIntInt i4 = MyTest::bar;</error>
IInt i5 = <error descr="Non-static method cannot be referenced from a static context">MyTest::baz</error>;