reactormonk
10/18/2024, 7:25 AMposthog().capture("reader_disconnected", mapOf("unitName" to logName, "voltage" to previousBattery))
fun:
fun PostHog.capture(s: String, mapOf: Map<String, Any>) {
capture(s, mapOf)
}
But the compiler doesn't seem to pick it up, even though the IDE suggested it.
Type mismatch.
Required: Properties?
Found: Map<String, {Comparable*>? & java.io.Serializable?}>Riccardo Lippolis
10/18/2024, 7:30 AMcapture function accepting a Properties object? If so, if it's a java.util.Properties object, that might cause the conflicts because that class extends Hashtable<Object, Object> , which in turn implements Map<Object, Object>reactormonk
10/18/2024, 7:32 AMRiccardo Lippolis
10/18/2024, 7:33 AMProperties object specifically. A Properties is a Map, but a Map doesn't have to be a Properties 🙂reactormonk
10/18/2024, 7:34 AMreactormonk
10/18/2024, 7:37 AM