Skip to content

Commit

Permalink
Add @Suppress("NO_ACTUAL_FOR_EXPECT") for Room impementation
Browse files Browse the repository at this point in the history
* Room will generate `actual` classes for `expect` RoomDatabaseConstructor
  • Loading branch information
cartland committed Aug 15, 2024
1 parent 918a730 commit eeb8edd
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ abstract class AppDatabase : RoomDatabase() {
abstract fun fruittieDao(): FruittieDao
}

// The Room compiler will generate the `actual` implementations.
@Suppress("NO_ACTUAL_FOR_EXPECT")
expect object AppDatabaseConstructor : RoomDatabaseConstructor<AppDatabase>

internal const val dbFileName = "fruits.db"

0 comments on commit eeb8edd

Please sign in to comment.