I’m working on moving off of non-FIR-compatible AP...
# compiler
z
I’m working on moving off of non-FIR-compatible APIs and finding (in 1.8.0-Beta) that external static java methods are not modeled in functions. Is this expected?
Copy code
val jsonReaderOptionsOf by lazy {
  // TODO FIR doesn't seem to be able to parse static java methods
  pluginContext
    .referenceClass(ClassId.fromString("com/squareup/moshi/JsonReader.Options"))!!
    .functions
    .single { it.owner.name.asString() == "of" }
}
Where it’s trying to model this method: https://github.com/square/moshi/blob/moshi_1.15.x/moshi/src/main/java/com/squareup/moshi/JsonReader.java#L632
d
Indeed, thanks for report (I've extracted KT-55269 from it)
Actually the bug is quite trivial, so fix will be in
master
in next few days
z
Awesome! Glad to hear it was easy