https://kotlinlang.org logo
#compose
Title
# compose
h

Halil Ozercan

07/24/2020, 3:52 PM
I'm getting this weird error while trying to compile
Copy code
Comparison of incompatible enums 'Direction' and '[ERROR : Direction.LEFT]' is always unsuccessful
Android Studio doesn't show any errors though. The offending line is #4
Copy code
.dragGestureFilter(
        dragObserver = dragObserver,
        canDrag = {
            it == Direction.LEFT || it == Direction.RIGHT
        }
)
Copy code
.dragGestureFilter(
        dragObserver = dragObserver,
        canDrag = {
            it.name == "LEFT" || it.name == "RIGHT"
        }
)
this compiles btw
2 Views