Hi, I would like to ignore a warning the compiler ...
# getting-started
v
Hi, I would like to ignore a warning the compiler is throwing:
Copy code
Type mismatch: inferred type is Cursor? but Cursor was expected
I can ignore it safely but de IDE does not provide me any suggestion to add a
Copy code
@SupressWarning`
k
Isn't that what
!!
does?
v
I don't need to use that operator, the type is not being inferred correctly so I want to ignore that warning
k
Hmm, it's really a warning? From the Kotlin compiler? Can you show some example code?
v
Sure

https://cl.ly/e2e812bca262/Captura%252520de%252520pantalla%2525202019-08-22%252520a%252520las%25252012.50.06.png

Each line starts with
Copy code
w:
And each method call results in these warnings:

https://cl.ly/a512176a0395/%255B16d9f6c43383bd984988a61307504d16%255D_Captura%252520de%252520pantalla%2525202019-08-22%252520a%252520las%25252012.51.15.png

But I can safely ignore them because I have the if check at first
And sessionCursor is a local variable in the same method, declared as val
@karelpeeters what do you think?
k
That's looks like either a bug or some incremental build gong wrong.
Can you try a clean build?
v
Tried with no luck
So can I remove these warnings with a supresswarning annotation?
k
You're not going to find a solution there, this is definitely some kind of bug.
Try to create a minimal example if you can.