Improve diagnostics for lateinit properties with generic type
#KT-11834 Fixed
This commit is contained in:
+3
@@ -0,0 +1,3 @@
|
||||
class C<V>() {
|
||||
<error descr="[INAPPLICABLE_LATEINIT_MODIFIER] 'lateinit' modifier is not allowed on properties of a type with nullable upper bound">lateinit</error> var item: V
|
||||
}
|
||||
@@ -1004,6 +1004,12 @@ public class PsiCheckerTestGenerated extends AbstractPsiCheckerTest {
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("lateinitOfATypeWithNullableUpperBound.kt")
|
||||
public void testLateinitOfATypeWithNullableUpperBound() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/lateinitOfATypeWithNullableUpperBound.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("nArgumentsExpectedMessage.kt")
|
||||
public void testNArgumentsExpectedMessage() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/checker/diagnosticsMessage/nArgumentsExpectedMessage.kt");
|
||||
|
||||
Reference in New Issue
Block a user