Nathan Bedell

    Nathan Bedell

    3 months ago
    Does anyone know why the new underscore type operator in Kotlin 1.7 seems to not be working for me? I'm using the Android Kotlin gradle plugin with Kotlin 1.7, and wherever I put "_" for a type argument, I just get "Unresolved reference: _". Is this a feature that needs to be explicitly opted-in to? From the 1.7 feature update it sounded like this should work be default. Even a simple example like mapOf<Int, _>(2 to 3) doesn't work for me.
    This may have just been operator error. It seems like I had two ext.kotlin_version declarations in my build.gradle file. So one was overwriting the other.
    mcpiroman

    mcpiroman

    3 months ago
    I don't think it is implemented yet, and if so, then maybe just in K2?
    dmitriy.novozhilov

    dmitriy.novozhilov

    3 months ago
    This feature is implemented for both K1 and K2, and it workshttps://pl.kotl.in/4a_SiUhuS Do you try use it in code of your application or in gradle scripts?