mongo4cats
mongo4cats copied to clipboard
Intellij marks ZMongo usages as errors
I know Intellij is buggy sometimes when working with Scala 3 but can we somehow bypass the display of these errors? I suppose it ocurres because Intellij finds object and trait in the package simultaneously and cannot decide which one it is referring to :)
The error that you have on the first screenshot is correct: ZMongoClient
does not take any type arguments. it should just be:
database <- ZIO.serviceWithZIO[ZMongoClient](_.getDatabase(config.database))
The second error is quite weird though, Intellij shouldn't be complaining about it.
Out of curiosity, if you run code from this example, will your IDE show errors there as well?
The error that you have on the first screenshot is correct: ZMongoClient does not take any type arguments. it should just be
Yes I know, I just added two parameters in order to show that Intellij is behaving weird saying opposite things in the hint. If you don't pass any parameters, it says you should add one; if you pass one, it says you shouldn't pass any; if you pass two, it says both things.
Out of curiosity, if you run code from this example, will your IDE show errors there as well?
Yes:
Having the same issue on the latest Idea *it compiles and runs well
https://youtrack.jetbrains.com/issue/SCL-21547