Always use a temp local val in FieldGetter when gen Kotlin and nullable.

Otherwise compilation will fail due to an impossible smart cast when the entity property is from another module (already compiled), even if the property is immutable (val).

Even though the temp local val is not necessary when the call type is a field and immutable, this change still generates it since otherwise we would need to check or expose through XProcessing the KSP declaration's origin.

Bug: 274760383
Test: DaoKotlinCodeGenTest
Change-Id: Ia48f834afa8569b3cb8c790dcba47455ce04c990
diff --git a/room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt b/room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
index 480173c..25aa37e 100644
--- a/room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
+++ b/room/room-compiler/src/test/test-data/kotlinCodeGen/pojoRowAdapter_enum.kt
@@ -33,10 +33,11 @@
             public override fun bind(statement: SupportSQLiteStatement, entity: MyEntity): Unit {
                 statement.bindLong(1, entity.pk.toLong())
                 statement.bindString(2, __Fruit_enumToString(entity.enum))
-                if (entity.nullableEnum == null) {
+                val _tmpNullableEnum: Fruit? = entity.nullableEnum
+                if (_tmpNullableEnum == null) {
                     statement.bindNull(3)
                 } else {
-                    statement.bindString(3, __Fruit_enumToString(entity.nullableEnum))
+                    statement.bindString(3, __Fruit_enumToString(_tmpNullableEnum))
                 }
             }
         }