"Add non-null asserted (!!) call": Fix for array access expression (KT-27071)

^KT-27071 Fixed
This commit is contained in:
Natalia Selezneva
2018-09-26 18:08:03 +09:00
parent 90da274eaa
commit 1b715ab253
10 changed files with 73 additions and 2 deletions
+7
View File
@@ -0,0 +1,7 @@
// "Add non-null asserted (!!) call" "true"
// SHOULD_BE_AVAILABLE_AFTER_EXECUTION
// ERROR: Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Array<String?>?
fun foo(a: Array<String?>?): String {
return <caret>a[0]
}