Joachim Ansorg
11/26/2019, 6:41 PMpackage testArrow
import arrow.higherkind
@higherkind
class Id<out A>(val value: A)
val id : IdOf<Int> = Id(42)
fun main() {
val x = id.fix()
}
Then, I typed id.
in main which triggered a transformation with the quote system. I got this expception:
java.lang.IllegalStateException: No qualified rhs for DOT_QUALIFIED_EXPRESSION
at arrow.meta.internal.kastree.ast.psi.Converter.convertBinaryOp(Converter.kt:101)
at arrow.meta.internal.kastree.ast.psi.Converter.convertExpr(Converter.kt:259)
at arrow.meta.internal.kastree.ast.psi.Converter.convertStmtNo(Converter.kt:488)
at arrow.meta.internal.kastree.ast.psi.Converter.convertBlock(Converter.kt:105)
at arrow.meta.internal.kastree.ast.psi.Converter.convertFuncBody(Converter.kt:323)
at arrow.meta.internal.kastree.ast.psi.Converter.convertFunc(Converter.kt:319)
at arrow.meta.internal.kastree.ast.psi.Converter.convertDecl(Converter.kt:199)
at arrow.meta.internal.kastree.ast.psi.Converter.convertFile(Converter.kt:298)
at arrow.meta.quotes.QuoteKt.sourceWithTransformationsAst(Quote.kt:292)
at arrow.meta.ide.phases.resolve.QuoteSystemCache.transformFiles(QuoteSystemCache.kt:326)
at arrow.meta.ide.phases.resolve.QuoteSystemCache.access$transformFiles(QuoteSystemCache.kt:56)
at arrow.meta.ide.phases.resolve.QuoteSystemCache$refreshCache$1$transformed$1.compute(QuoteSystemCache.kt:189)
at arrow.meta.ide.phases.resolve.QuoteSystemCache$refreshCache$1$transformed$1.compute(QuoteSystemCache.kt:56)
at com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:936)
at com.intellij.openapi.application.ReadAction.compute(ReadAction.java:57)
at arrow.meta.ide.phases.resolve.QuoteSystemCache$refreshCache$1.run(QuoteSystemCache.kt:188)
at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:294)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)
Is this a bug or may I only send code with valid syntax to the quote system?raulraja
11/26/2019, 9:01 PMamanda.hinchman-dominguez
11/26/2019, 11:19 PMid.fix()
since we don't care about evaluation - it looks like the error message is saying that it's considering the right hand side of the binary operation to be .fix()
when it should be fix()
. @Joachim Ansorg, are you able to debug and confirm this theory?Joachim Ansorg
11/26/2019, 11:23 PMraulraja
11/27/2019, 10:30 AMamanda.hinchman-dominguez
11/27/2019, 11:15 AM.
by itself should be the operator. It should not be included in rhs
or lhs
square(3)
as
(= 3)
for value.argumentExpression
because it considers it as valueName = ValueArgument