org.jetbrains.kotlin.utils.KotlinFrontEndException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • "New Project"/"New Module"/ other wizards broken
    via by Unknown author,
  • Settings class name conflict
    via GitHub by djlambert
    ,
    • org.jetbrains.kotlin.utils.KotlinFrontEndException: Exception while analyzing expression at (5,29) in /home/sufix/work/kotlin-experiments/src/main.kt: Pair<String, String>::first at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.logOrThrowException(ExpressionTypingVisitorDispatcher.java:254) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.access$200(ExpressionTypingVisitorDispatcher.java:48) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:224) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:143) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorForStatements.visitExpression(ExpressionTypingVisitorForStatements.java:344) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorForStatements.visitExpression(ExpressionTypingVisitorForStatements.java:59) at org.jetbrains.kotlin.psi.KtVisitor.visitDoubleColonExpression(KtVisitor.java:278) at org.jetbrains.kotlin.psi.KtVisitor.visitCallableReferenceExpression(KtVisitor.java:282) at org.jetbrains.kotlin.psi.KtCallableReferenceExpression.accept(KtCallableReferenceExpression.java:43) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:182) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:156) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getTypeOfLastExpressionInBlock(ExpressionTypingServices.java:290) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBlockReturnedTypeWithWritableScope(ExpressionTypingServices.java:243) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBlockReturnedType(ExpressionTypingServices.java:175) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBlockReturnedType(ExpressionTypingServices.java:154) at org.jetbrains.kotlin.types.expressions.BasicExpressionTypingVisitor.visitBlockExpression(BasicExpressionTypingVisitor.java:588) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.visitBlockExpression(ExpressionTypingVisitorDispatcher.java:364) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$ForDeclarations.visitBlockExpression(ExpressionTypingVisitorDispatcher.java:55) at org.jetbrains.kotlin.psi.KtBlockExpression.accept(KtBlockExpression.java:44) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:182) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:143) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getTypeInfo(ExpressionTypingServices.java:103) at org.jetbrains.kotlin.resolve.calls.ArgumentTypeResolver.getCallableReferenceTypeInfo(ArgumentTypeResolver.java:232) at org.jetbrains.kotlin.resolve.calls.GenericCandidateResolver.getResolvedTypeForCallableReference(GenericCandidateResolver.kt:350) at org.jetbrains.kotlin.resolve.calls.GenericCandidateResolver.addConstraintForCallableReference(GenericCandidateResolver.kt:311) at org.jetbrains.kotlin.resolve.calls.GenericCandidateResolver.completeTypeInferenceDependentOnFunctionArgumentsForCall(GenericCandidateResolver.kt:220) at org.jetbrains.kotlin.resolve.calls.CallResolver.completeTypeInferenceDependentOnFunctionLiterals(CallResolver.java:547) at org.jetbrains.kotlin.resolve.calls.CallResolver.doResolveCallOrGetCachedResults(CallResolver.java:519) at org.jetbrains.kotlin.resolve.calls.CallResolver.access$100(CallResolver.java:64) at org.jetbrains.kotlin.resolve.calls.CallResolver$3.invoke(CallResolver.java:495) at org.jetbrains.kotlin.resolve.calls.CallResolver$3.invoke(CallResolver.java:481) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveCallWithKnownCandidate(CallResolver.java:481) at org.jetbrains.kotlin.types.expressions.ControlStructureTypingUtils.resolveSpecialConstructionAsCall(ControlStructureTypingUtils.java:110) at org.jetbrains.kotlin.types.expressions.ControlStructureTypingVisitor.visitIfExpression(ControlStructureTypingVisitor.java:130) at org.jetbrains.kotlin.types.expressions.ControlStructureTypingVisitor.visitIfExpression(ControlStructureTypingVisitor.java:90) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.visitIfExpression(ExpressionTypingVisitorDispatcher.java:290) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$ForDeclarations.visitIfExpression(ExpressionTypingVisitorDispatcher.java:55) at org.jetbrains.kotlin.psi.KtIfExpression.accept(KtIfExpression.java:33) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:182) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:143) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getTypeInfo(ExpressionTypingServices.java:103) at org.jetbrains.kotlin.resolve.calls.ArgumentTypeResolver.getArgumentTypeInfo(ArgumentTypeResolver.java:218) at org.jetbrains.kotlin.resolve.calls.ArgumentTypeResolver.analyzeArgumentsAndRecordTypes(ArgumentTypeResolver.java:329) at org.jetbrains.kotlin.resolve.calls.CallResolver.doResolveCall(CallResolver.java:578) at org.jetbrains.kotlin.resolve.calls.CallResolver.doResolveCallOrGetCachedResults(CallResolver.java:514) at org.jetbrains.kotlin.resolve.calls.CallResolver.access$100(CallResolver.java:64) at org.jetbrains.kotlin.resolve.calls.CallResolver$1.invoke(CallResolver.java:185) at org.jetbrains.kotlin.resolve.calls.CallResolver$1.invoke(CallResolver.java:179) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.resolve.calls.CallResolver.computeTasksAndResolveCall(CallResolver.java:179) at org.jetbrains.kotlin.resolve.calls.CallResolver.computeTasksAndResolveCall(CallResolver.java:169) at org.jetbrains.kotlin.resolve.calls.CallResolver.resolveFunctionCall(CallResolver.java:265) at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getResolvedCallForFunction(CallExpressionResolver.kt:87) at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getCallExpressionTypeInfoWithoutFinalTypeCheck(CallExpressionResolver.kt:193) at org.jetbrains.kotlin.resolve.calls.CallExpressionResolver.getCallExpressionTypeInfo(CallExpressionResolver.kt:172) at org.jetbrains.kotlin.types.expressions.BasicExpressionTypingVisitor.visitCallExpression(BasicExpressionTypingVisitor.java:819) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.visitCallExpression(ExpressionTypingVisitorDispatcher.java:389) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$ForBlock.visitCallExpression(ExpressionTypingVisitorDispatcher.java:68) at org.jetbrains.kotlin.psi.KtCallExpression.accept(KtCallExpression.java:35) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:182) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:143) at org.jetbrains.kotlin.types.expressions.ExpressionTypingUtils.getExpressionReceiver(ExpressionTypingUtils.java:60) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorForStatements.visitDestructuringDeclaration(ExpressionTypingVisitorForStatements.java:122) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorForStatements.visitDestructuringDeclaration(ExpressionTypingVisitorForStatements.java:59) at org.jetbrains.kotlin.psi.KtDestructuringDeclaration.accept(KtDestructuringDeclaration.java:39) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:182) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:156) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getTypeOfLastExpressionInBlock(ExpressionTypingServices.java:292) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBlockReturnedTypeWithWritableScope(ExpressionTypingServices.java:243) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBlockReturnedType(ExpressionTypingServices.java:175) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.getBlockReturnedType(ExpressionTypingServices.java:154) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorForStatements.visitBlockExpression(ExpressionTypingVisitorForStatements.java:387) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorForStatements.visitBlockExpression(ExpressionTypingVisitorForStatements.java:59) at org.jetbrains.kotlin.psi.KtBlockExpression.accept(KtBlockExpression.java:44) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:182) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:92) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:172) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.getTypeInfo(ExpressionTypingVisitorDispatcher.java:156) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.checkFunctionReturnType(ExpressionTypingServices.java:149) at org.jetbrains.kotlin.types.expressions.ExpressionTypingServices.checkFunctionReturnType(ExpressionTypingServices.java:133) at org.jetbrains.kotlin.resolve.BodyResolver.resolveFunctionBody(BodyResolver.java:834) at org.jetbrains.kotlin.resolve.BodyResolver.resolveFunctionBody(BodyResolver.java:780) at org.jetbrains.kotlin.resolve.BodyResolver.resolveFunctionBodies(BodyResolver.java:766) at org.jetbrains.kotlin.resolve.BodyResolver.resolveBehaviorDeclarationBodies(BodyResolver.java:108) at org.jetbrains.kotlin.resolve.BodyResolver.resolveBodies(BodyResolver.java:230) at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzer.analyzeDeclarations(LazyTopDownAnalyzer.kt:192) at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzerForTopLevel.analyzeDeclarations(LazyTopDownAnalyzerForTopLevel.java:74) at org.jetbrains.kotlin.resolve.LazyTopDownAnalyzerForTopLevel.analyzeFiles(LazyTopDownAnalyzerForTopLevel.java:66) at org.jetbrains.kotlin.resolve.jvm.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.java:145) at org.jetbrains.kotlin.resolve.jvm.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegrationWithCustomContext(TopDownAnalyzerFacadeForJVM.java:78) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler$analyze$1.analyze(KotlinToJVMBytecodeCompiler.kt:318) at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:129) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:311) at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules(KotlinToJVMBytecodeCompiler.kt:124) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:173) at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:49) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:195) at org.jetbrains.kotlin.cli.common.CLICompiler.exec(CLICompiler.java:152) at org.jetbrains.kotlin.cli.common.CLICompiler.execAndOutputXml(CLICompiler.java:77) at org.jetbrains.kotlin.daemon.CompileServiceImpl$remoteIncrementalCompile$1.invoke(CompileServiceImpl.kt:248) at org.jetbrains.kotlin.daemon.CompileServiceImpl$remoteIncrementalCompile$1.invoke(CompileServiceImpl.kt:71) at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1$1.invoke(CompileServiceImpl.kt:422) at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1$1.invoke(CompileServiceImpl.kt:71) at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137) at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:455) at org.jetbrains.kotlin.daemon.CompileServiceImpl.access$checkedCompile(CompileServiceImpl.kt:71) at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1.invoke(CompileServiceImpl.kt:421) at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$1.invoke(CompileServiceImpl.kt:71) at org.jetbrains.kotlin.daemon.CompileServiceImpl.ifAlive(CompileServiceImpl.kt:540) at org.jetbrains.kotlin.daemon.CompileServiceImpl.ifAlive$default(CompileServiceImpl.kt:505) at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:412) at org.jetbrains.kotlin.daemon.CompileServiceImpl.remoteIncrementalCompile(CompileServiceImpl.kt:245) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:322) at sun.rmi.transport.Transport$1.run(Transport.java:177) at sun.rmi.transport.Transport$1.run(Transport.java:174) at java.security.AccessController.doPrivileged(Native Method) at sun.rmi.transport.Transport.serviceCall(Transport.java:173) at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:556) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:811) at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:670) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.AssertionError: Rewrite at slice LEXICAL_SCOPE key: REFERENCE_EXPRESSION old value: Snapshot(0) for CODE_BLOCK@1522270336 new value: Snapshot(0) for CODE_BLOCK@1824850441 File name: main.kt Physical: true fun main(args: Array<String>) { val (x, y) = Pair(1, if (1 == 1) Pair<String, String>::<caret>first else Pair<String, String>::second) } at com.intellij.openapi.diagnostic.DefaultLogger.error(DefaultLogger.java:66) at com.intellij.openapi.diagnostic.Logger.error(Logger.java:115) at org.jetbrains.kotlin.util.slicedMap.Slices$1.processRewrite(Slices.java:40) at org.jetbrains.kotlin.util.slicedMap.SlicedMapImpl.put(SlicedMapImpl.java:60) at org.jetbrains.kotlin.resolve.DelegatingBindingTrace.record(DelegatingBindingTrace.java:111) at org.jetbrains.kotlin.resolve.BindingContextUtils$1.invoke(BindingContextUtils.java:224) at org.jetbrains.kotlin.resolve.BindingContextUtils$1.invoke(BindingContextUtils.java:220) at org.jetbrains.kotlin.util.slicedMap.SlicedMapImpl.forEach(SlicedMapImpl.java:113) at org.jetbrains.kotlin.resolve.BindingContextUtils.addOwnDataTo(BindingContextUtils.java:220) at org.jetbrains.kotlin.resolve.DelegatingBindingTrace.addOwnDataTo(DelegatingBindingTrace.java:175) at org.jetbrains.kotlin.resolve.DelegatingBindingTrace.addOwnDataTo(DelegatingBindingTrace.java:166) at org.jetbrains.kotlin.resolve.TemporaryBindingTrace.commit(TemporaryBindingTrace.java:42) at org.jetbrains.kotlin.resolve.calls.context.TemporaryTraceAndCache.commit(TemporaryTraceAndCache.java:36) at org.jetbrains.kotlin.resolve.callableReferences.CallableReferencesResolutionUtilsKt.acceptResolution(CallableReferencesResolutionUtils.kt:70) at org.jetbrains.kotlin.resolve.callableReferences.CallableReferencesResolutionUtilsKt.access$acceptResolution(CallableReferencesResolutionUtils.kt:1) at org.jetbrains.kotlin.resolve.callableReferences.CallableReferencesResolutionUtilsKt$resolvePossiblyAmbiguousCallableReference$2.invoke(CallableReferencesResolutionUtils.kt:134) at org.jetbrains.kotlin.resolve.callableReferences.CallableReferencesResolutionUtilsKt.resolvePossiblyAmbiguousCallableReference(CallableReferencesResolutionUtils.kt:155) at org.jetbrains.kotlin.resolve.callableReferences.CallableReferencesResolutionUtilsKt.resolveCallableReferenceTarget(CallableReferencesResolutionUtils.kt:169) at org.jetbrains.kotlin.types.expressions.BasicExpressionTypingVisitor.getCallableReferenceType(BasicExpressionTypingVisitor.java:785) at org.jetbrains.kotlin.types.expressions.BasicExpressionTypingVisitor.visitCallableReferenceExpression(BasicExpressionTypingVisitor.java:713) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher.visitCallableReferenceExpression(ExpressionTypingVisitorDispatcher.java:374) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$ForBlock.visitCallableReferenceExpression(ExpressionTypingVisitorDispatcher.java:68) at org.jetbrains.kotlin.psi.KtCallableReferenceExpression.accept(KtCallableReferenceExpression.java:43) at org.jetbrains.kotlin.types.expressions.ExpressionTypingVisitorDispatcher$1.invoke(ExpressionTypingVisitorDispatcher.java:182) ... 144 more Caused by: java.lang.Throwable ... 167 more

    Users with the same issue

    jpvee
    1 times, last one,
    neowulf33
    1 times, last one,
    poroszd
    4 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,