Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arrow-meta Transform.replace ().Unresolved reference: arrow #922

Open
song3liu opened this issue Nov 12, 2021 · 2 comments
Open

Arrow-meta Transform.replace ().Unresolved reference: arrow #922

song3liu opened this issue Nov 12, 2021 · 2 comments

Comments

@song3liu
Copy link

I tested the code in Arrow-meta CliPlugin. but it does not work.
when I build in use-plugin ,the error is :NewMultipleSource.kt: (3, 2): Unresolved reference: arrow

val Meta.transformNewSources: CliPlugin
get() = "Transform New Multiple Source" {
meta(
classDeclaration(this,{element.name=="NewMultipleSource" }) {
changeClassVisibility("NewMultipleSource" ,it.element,this)
}
)
}

fun CompilerContext.changeClassVisibility(className: String, context: KtClass, declaration: ClassDeclaration): Transform<KtClass> = declaration.run {
    Transform.replace(
        replacing = context,
        newDeclaration = """
    |private class $className {
    |   $body
    | } """.`class`.syntheticScope
    )}

generate-sources.zip

@nomisRev nomisRev transferred this issue from arrow-kt/arrow Nov 17, 2021
@BreimerR
Copy link

Having the same problem is there a tag that's used to build the versions that work and what's the current version tag?

@song3liu
Copy link
Author

song3liu commented Mar 1, 2022

replace .class.syntheticScope with .class ,then it works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants