Hi! I'm writing a compiler plugin while following ...
# compiler
g
Hi! I'm writing a compiler plugin while following this series of articles. There is the following block of code there:
Copy code
pluginContext.referenceClass(FqName("kotlin.time.TimeSource.Monotonic"))!!
As this overload of the
referenceClass
is deprecated, I rewrote it as
Copy code
pluginContext.referenceClass(ClassId(FqName("kotlin.time.TimeSource"), Name.identifier("Monotonic")))!!
But now it does not find the
Monotonic
object. While
Copy code
pluginContext.referenceClass(ClassId(FqName("kotlin.time"), Name.identifier("TimeSource")))!!
works fine. The problem can be reproduced here. What am I missing?
1
e
Copy code
ClassId(packageFqName = FqName("kotlin.time"), relativeFqName = FqName("TimeSource.Monotonic"))
🔥 1