KotlinPoet: Why is there a difference between %N a...
# squarelibraries
h
KotlinPoet: Why is there a difference between %N and %M? I often need to handle illegal Kotlin member names, so I use
MemberName("MyObject", "my-prop")
and I need carefully adopt my generator to use
%N
. This is also affects
%L
, which uses the same
%M
escaping when passing
MemberName
. Also related,
%N
only writes the escaped property name, but does not include the class name, so I need to write the classname manually in another code block too.
h
Yes, but both use
MemberName
but results in different output, which is somehow confusing.