Rename: auto cast -> smart cast
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
//KT-1355 Type inference fails with autocast and generic function
|
||||
//KT-1355 Type inference fails with smartcast and generic function
|
||||
//tests for Map.set
|
||||
package a
|
||||
|
||||
@@ -6,9 +6,9 @@ import java.util.HashMap
|
||||
|
||||
fun foo(map: MutableMap<Int, String>, value: String?) {
|
||||
if (value != null) {
|
||||
map.put(1, <!DEBUG_INFO_AUTOCAST!>value<!>) //ok
|
||||
map.set(1, <!DEBUG_INFO_AUTOCAST!>value<!>) //type inference failed
|
||||
map[1] = <!DEBUG_INFO_AUTOCAST!>value<!> //type inference failed
|
||||
map.put(1, <!DEBUG_INFO_SMARTCAST!>value<!>) //ok
|
||||
map.set(1, <!DEBUG_INFO_SMARTCAST!>value<!>) //type inference failed
|
||||
map[1] = <!DEBUG_INFO_SMARTCAST!>value<!> //type inference failed
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ public data open class Tag(public var tagName: String) {
|
||||
}
|
||||
else {
|
||||
attributes["id"] = value<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>
|
||||
attributes["id"] = <!DEBUG_INFO_AUTOCAST!>value<!>
|
||||
attributes["id"] = <!DEBUG_INFO_SMARTCAST!>value<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user