java.lang.ClassCastException: com.jetbrains.php.lang.psi.elements.impl.ClassConstantReferenceImpl cannot be cast to com.jetbrains.php.lang.psi.elements.StringLiteralExpression

GitHub | CarsonF | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Fatal Error: ClassConstantReferenceImpl cannot be cast to StringLiteralExpression

    GitHub | 2 years ago | CarsonF
    java.lang.ClassCastException: com.jetbrains.php.lang.psi.elements.impl.ClassConstantReferenceImpl cannot be cast to com.jetbrains.php.lang.psi.elements.StringLiteralExpression

    Root Cause Analysis

    1. java.lang.ClassCastException

      com.jetbrains.php.lang.psi.elements.impl.ClassConstantReferenceImpl cannot be cast to com.jetbrains.php.lang.psi.elements.StringLiteralExpression

      at sk.sorien.silexplugin.pimple.PimplePhpTypeProvider.getTypeForParameterOfAnonymousFunction()
    2. sk.sorien.silexplugin
      PimplePhpTypeProvider.getType
      1. sk.sorien.silexplugin.pimple.PimplePhpTypeProvider.getTypeForParameterOfAnonymousFunction(PimplePhpTypeProvider.java:167)
      2. sk.sorien.silexplugin.pimple.PimplePhpTypeProvider.getType(PimplePhpTypeProvider.java:35)
      2 frames
    3. JetBrains php
      PhpTypeInfo$1.internalCompute
      1. com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:43)
      2. com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo$1.internalCompute(PhpTypeInfo.java:37)
      2 frames
    4. IDEA
      RecursionManager.doPreventingRecursion
      1. com.intellij.openapi.util.Computable$NotNullCachedComputable.compute(Computable.java:52)
      2. com.intellij.openapi.util.RecursionManager$2.doPreventingRecursion(RecursionManager.java:112)
      3. com.intellij.openapi.util.RecursionManager.doPreventingRecursion(RecursionManager.java:68)
      3 frames
    5. JetBrains php
      PhpFunctionElementType.createStub
      1. com.jetbrains.php.lang.psi.resolve.types.PhpTypeInfo.getType(PhpTypeInfo.java:37)
      2. com.jetbrains.php.lang.psi.elements.impl.PhpTypedElementImpl.getType(PhpTypedElementImpl.java:26)
      3. com.jetbrains.php.lang.psi.elements.impl.FunctionImpl.visitReturn(FunctionImpl.java:175)
      4. com.jetbrains.php.lang.psi.elements.impl.FunctionImpl.scanTree(FunctionImpl.java:208)
      5. com.jetbrains.php.lang.psi.elements.impl.FunctionImpl.getLocalType(FunctionImpl.java:152)
      6. com.jetbrains.php.lang.psi.stubs.PhpFunctionElementType.createStub(PhpFunctionElementType.java:30)
      7. com.jetbrains.php.lang.psi.stubs.PhpFunctionElementType.createStub(PhpFunctionElementType.java:20)
      7 frames
    6. IDEA
      StubIndex.getElements
      1. com.intellij.psi.stubs.DefaultStubBuilder.buildStubTreeFor(DefaultStubBuilder.java:60)
      2. com.intellij.psi.stubs.DefaultStubBuilder.buildStubTree(DefaultStubBuilder.java:36)
      3. com.intellij.psi.impl.source.PsiFileImpl.calcStubTree(PsiFileImpl.java:997)
      4. com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:62)
      5. com.intellij.psi.stubs.StubProcessingHelperBase.processStubsInFile(StubProcessingHelperBase.java:39)
      6. com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:274)
      7. com.intellij.psi.stubs.StubIndexImpl$2.perform(StubIndexImpl.java:265)
      8. com.intellij.util.indexing.ValueContainer.forEach(ValueContainer.java:81)
      9. com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:265)
      10. com.intellij.psi.stubs.StubIndexImpl.processElements(StubIndexImpl.java:238)
      11. com.intellij.psi.stubs.StubIndex.process(StubIndex.java:76)
      12. com.intellij.psi.stubs.StubIndex.process(StubIndex.java:95)
      13. com.intellij.psi.stubs.StubIndexImpl.get(StubIndexImpl.java:227)
      14. com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:144)
      15. com.intellij.psi.stubs.StubIndex.getElements(StubIndex.java:134)
      15 frames
    7. JetBrains php
      PhpCompletionContributor$PhpClassRefCompletionProvider.addCompletions
      1. com.jetbrains.php.PhpIndexImpl.getClassesByNameInScope(PhpIndexImpl.java:217)
      2. com.jetbrains.php.PhpIndexImpl.getClassesByName(PhpIndexImpl.java:211)
      3. com.jetbrains.php.completion.PhpCompletionContributor$PhpClassRefCompletionProvider.addCompletions(PhpCompletionContributor.java:453)
      3 frames
    8. IDEA
      CompletionContributor.fillCompletionVariants
      1. com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
      2. com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
      2 frames
    9. JetBrains php
      PhpCompletionContributor.fillCompletionVariants
      1. com.jetbrains.php.completion.PhpCompletionContributor.fillCompletionVariants(PhpCompletionContributor.java:303)
      1 frame
    10. IDEA
      ApplicationImpl$8.run
      1. com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
      2. com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:135)
      3. com.intellij.codeInsight.completion.CompletionResultSet.runRemainingContributors(CompletionResultSet.java:128)
      4. com.intellij.codeInsight.template.impl.LiveTemplateCompletionContributor$2.addCompletions(LiveTemplateCompletionContributor.java:90)
      5. com.intellij.codeInsight.completion.CompletionProvider.addCompletionVariants(CompletionProvider.java:36)
      6. com.intellij.codeInsight.completion.CompletionContributor.fillCompletionVariants(CompletionContributor.java:155)
      7. com.intellij.codeInsight.completion.CompletionService.getVariantsFromContributors(CompletionService.java:81)
      8. com.intellij.codeInsight.completion.CompletionService.performCompletion(CompletionService.java:112)
      9. com.intellij.codeInsight.completion.CompletionProgressIndicator.a(CompletionProgressIndicator.java:796)
      10. com.intellij.codeInsight.completion.CompletionProgressIndicator.access$1000(CompletionProgressIndicator.java:90)
      11. com.intellij.codeInsight.completion.CompletionProgressIndicator$1CalculateItems.run(CompletionProgressIndicator.java:778)
      12. com.intellij.codeInsight.completion.AsyncCompletion$1$1$1.run(CompletionThreading.java:93)
      13. com.intellij.openapi.application.impl.ApplicationImpl.runReadAction(ApplicationImpl.java:872)
      14. com.intellij.codeInsight.completion.AsyncCompletion$1$1.run(CompletionThreading.java:88)
      15. com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:152)
      16. com.intellij.openapi.progress.impl.CoreProgressManager.a(CoreProgressManager.java:452)
      17. com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:402)
      18. com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
      19. com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:137)
      20. com.intellij.codeInsight.completion.AsyncCompletion$1.run(CompletionThreading.java:84)
      21. com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:400)
      21 frames
    11. Java RT
      Thread.run
      1. java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
      2. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      3. java.util.concurrent.FutureTask.run(FutureTask.java:138)
      4. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
      5. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
      6. java.lang.Thread.run(Thread.java:695)
      6 frames
    12. IDEA
      PooledThreadExecutor$1$1.run
      1. org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:56)
      1 frame