commit | f5b36f8586ea112504d34160741831f8d8a1059d | [log] [tgz] |
---|---|---|
author | bcorso <bcorso@google.com> | Thu Sep 23 10:41:35 2021 -0700 |
committer | bcorso <bcorso@google.com> | Thu Sep 23 10:41:35 2021 -0700 |
tree | 3791153f63549c146b141a5cae1aecca89a6b6e2 | |
parent | 42c5417ed12e2a5d70541afa1ee8b53cf489a9a6 [diff] |
Change EnumEntry extension method to use XElement. EnumEntry extends XElement, but currently the extension method is attached to XTypeElement. Thus, the extension method can only be called from XTypeElement instances, which isn't very useful since that will always return `false`. Test: ./gradlew :room:r-c-p:test Change-Id: I6a629bf85d10b9bbf7c78629a2ddd66e14882e7a
diff --git a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XEnumEntry.kt b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XEnumEntry.kt index 0006ad5..fa74017 100644 --- a/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XEnumEntry.kt +++ b/room/room-compiler-processing/src/main/java/androidx/room/compiler/processing/XEnumEntry.kt
@@ -33,7 +33,7 @@ val enumTypeElement: XEnumTypeElement } -fun XTypeElement.isEnumEntry(): Boolean { +fun XElement.isEnumEntry(): Boolean { contract { returns(true) implies (this@isEnumEntry is XEnumEntry) }