Add failing test for smart-cast branch
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
b4a4d4d709
commit
b1731749c0
@@ -0,0 +1,11 @@
|
||||
inline fun <K, V, VA : V> MutableMap<K, V>.getOrPut(key: K, defaultValue: (K) -> VA, postCompute: (VA) -> Unit): V {
|
||||
val value = get(key)
|
||||
return if (value == null) {
|
||||
val answer = defaultValue(key)
|
||||
put(key, answer)
|
||||
postCompute(answer)
|
||||
answer
|
||||
} else {
|
||||
value
|
||||
}
|
||||
}
|
||||
Generated
+5
@@ -134,6 +134,11 @@ public class FirResolveTestCaseWithStdlibGenerated extends AbstractFirResolveTes
|
||||
runTest("compiler/fir/resolve/testData/resolve/stdlib/typeAliasDeserialization.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeParameterDerived.kt")
|
||||
public void testTypeParameterDerived() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/stdlib/typeParameterDerived.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("unaryOperators.kt")
|
||||
public void testUnaryOperators() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/stdlib/unaryOperators.kt");
|
||||
|
||||
Reference in New Issue
Block a user