Fixed assertion + refactored code making it more simple

This commit is contained in:
Valentin Kipyatkov
2014-07-16 19:12:04 +04:00
parent b9bd5c8fb8
commit d154d2e25b
4 changed files with 33 additions and 25 deletions
@@ -0,0 +1,8 @@
import java.util.*;
class A {
public static Map<String, String> foo() {
Properties props = new Properties();
return new HashMap<>((Map)props);
}
}
@@ -0,0 +1,11 @@
import java.util.*
import kotlin.Map
class A {
class object {
public fun foo(): Map<String, String> {
val props = Properties()
return HashMap(props as Map<Any, Any>)
}
}
}