https://kotlinlang.org logo
#room
Title
a

Aidan Low

11/08/2021, 6:53 PM
Does Room conflict with
-Xjvm-default=all
and
-Xjvm-default=all-compatibility
? Using version 2.3, if I add either of those flags then when I compile my
MyDao.kt
the generated
MyDao_Impl.java
for each overriden method
foo()
contains calls to
MyDao.super.foo()
rather than calling
MyDao.DefaultImpls.foo()
as it did when I specified
-Xjvm-default=enabled
, leading to compilation errors
Copy code
error: not an enclosing class: MyDao
        return MyDao.super.foo(__cont);
                    ^
(I was using @JvmDefault elsewhere in the codebase; never in my Room code)
6 Views