kosi-libs / Kodein

Painless Kotlin Dependency Injection
https://kosi-libs.org/kodein
MIT License
3.19k stars 174 forks source link

not enough information to infer type variable t #306

Closed kazimdsaidul closed 4 years ago

kazimdsaidul commented 4 years ago
private val factory: HomePageFactory by instance()

Android studio show this warring message. "not enough information to infer type variable t"

Screen Shot 2020-05-31 at 12 59 08 AM
romainbsl commented 4 years ago

This has already been answered here https://github.com/Kodein-Framework/Kodein-DI/issues/299

Yes its a Kotlin code analysis bug, you can find the relative issue here https://youtrack.jetbrains.com/issue/KT-38259

You can disable it here

Screenshot 2020-05-30 at 21 05 26
kazimdsaidul commented 4 years ago

Thanks for sharing.

On Sun, May 31, 2020, 1:06 AM Romain Boisselle notifications@github.com wrote:

Closed #306 https://github.com/Kodein-Framework/Kodein-DI/issues/306.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Kodein-Framework/Kodein-DI/issues/306#event-3389982584, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB25ILDWNUZICF4D253HKYLRUFKMTANCNFSM4NOZ4TCQ .

devggaurav commented 3 years ago

it's not an option for an android studio on ubuntu

romainbsl commented 3 years ago

This is enabled by default since Kotlin 1.4 so your issue seems could be different.

harshidsinghs commented 3 years ago

it's not an option for an android studio on ubuntu

even on windows

mdsardar commented 3 months ago

What to do if the above option is unavailable in IntelliJ IDEA 2023.1.6 (Ultimate Edition) ? My screen looks as below

kotlin