Passing or returning a type that does not match declared function signatures.
Kotlin's static type checker rejects expressions where the inferred type cannot be assigned to the required target type.
Attempting to pass `List<Any>` to a parameter expecting `List<String>`, or passing nullable `String?` where `String` is required.
1fun processName(name: String) {2 println("Name: ${name.uppercase()}")3}4 5fun main() {6 val input: String? = "Alice"7 // Error: Type mismatch: inferred type is String? but String was expected8 processName(input)9}1fun processName(name: String) {2 println("Name: ${name.uppercase()}")3}4 5fun main() {6 val input: String? = "Alice"7 8 // Fix 1: Safe call with let9 input?.let { processName(it) }10 11 // Fix 2: Elvis operator default fallback12 processName(input ?: "Guest")13}Simulate standard system builds to trigger compiler trace records and track memory crashes locally.
`processName` demands a non-null `String`. Variable `input` has type `String?` (nullable), which compiler prohibits passing directly.