// KT-312 Nullability problem when a nullable version of a generic type is returned fun Array.safeGet(index : Int) : T? { return if (index < size) this[index] else null } val args : Array = Array(1, {""}) val name : String = args.safeGet(0) // No error, must be type mismatch val name1 : String? = args.safeGet(0)