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

CliPlugin error:Unresolved reference: arrow #916

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

CliPlugin error:Unresolved reference: arrow #916

song3liu opened this issue Nov 12, 2021 · 0 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 = declaration.run {
Transform.replace(
replacing = context,
newDeclaration = """
|private class $className {
| $body
| } """.class.syntheticScope
)
generate-sources.zip
}

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

1 participant