summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorYigit Boyar <yboyar@google.com>2015-12-04 14:16:04 -0800
committerYigit Boyar <yboyar@google.com>2015-12-04 14:16:04 -0800
commit0b6d118e6eeb3bc100fc6a6e66016ab812cb2783 (patch)
treebe4c0e73010016b6fcc94a147dc684e77a1a715d /compiler
parent9eb684f8375efd59c4fd880bd578b470eb273d41 (diff)
downloaddata-binding-0b6d118e6eeb3bc100fc6a6e66016ab812cb2783.tar.gz
Avoid re-reading variables.
This CL fixes a bad code generation where we would set a variable to itself, which breaks if you use a tool like ErrorProne. I've also updated gradle version and data binding versions. Bug: 25077399 Change-Id: I6620faf4cad5fa74dc7c35be03c46c4a76c9cfbc
Diffstat (limited to 'compiler')
-rw-r--r--compiler/src/main/kotlin/android/databinding/tool/writer/LayoutBinderWriter.kt2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/src/main/kotlin/android/databinding/tool/writer/LayoutBinderWriter.kt b/compiler/src/main/kotlin/android/databinding/tool/writer/LayoutBinderWriter.kt
index c36236f1..7874d401 100644
--- a/compiler/src/main/kotlin/android/databinding/tool/writer/LayoutBinderWriter.kt
+++ b/compiler/src/main/kotlin/android/databinding/tool/writer/LayoutBinderWriter.kt
@@ -829,7 +829,7 @@ class LayoutBinderWriter(val layoutBinder : LayoutBinder) {
val dependants = ArrayList<Expr>()
expressions.groupBy { condition(it) }.forEach {
val condition = it.key
- val assignedValues = it.value.filter { it.needsLocalField }
+ val assignedValues = it.value.filter { it.needsLocalField && !it.isVariable() }
if (!assignedValues.isEmpty()) {
val assignment = kcode("") {
assignedValues.forEach { expr: Expr ->