Fixed assertion + refactored code making it more simple
This commit is contained in:
@@ -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>)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user