Skip to content

Cannot highlight types #2198

Closed
Closed
@odk211

Description

Version

11.13.0

What I was doing

  1. Write module like below.
defmodule Schema do
  alias Schema

  defmacro def_schema(fields) do
    quote bind_quoted: [fields: fields] do
      defstruct Keyword.keys(fields)

      @type t :: %__MODULE__{
                   unquote_splicing(Enum.map(fields, &Schema.spec_field/1))
                 }
    end
  end

  def spec_field(_) do
  end
end
  1. Reopen project

Exceptions

Exception 0

Excerpt

&Schema.spec_field/1

From: schema.ex:8
To: schema.ex:8

Element Class Name

org.elixir_lang.psi.impl.ElixirUnmatchedGreaterThanOrEqualToOnePointSixCaptureNonNumericOperationImpl

Stacktrace

java.lang.Throwable: Cannot highlight types
	at org.elixir_lang.errorreport.Logger.error(Logger.java:42)
	at org.elixir_lang.errorreport.Logger.error(Logger.java:28)
	at org.elixir_lang.annotator.ModuleAttribute.error(ModuleAttribute.kt:123)
	at org.elixir_lang.annotator.ModuleAttribute.cannotHighlightTypes(ModuleAttribute.kt:119)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1050)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1062)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1155)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:985)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1062)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1194)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1025)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1062)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:909)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1062)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:909)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1062)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:909)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1062)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:909)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:878)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:966)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:1062)
	at org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.kt:909)
	at org.elixir_lang.annotator.ModuleAttribute.highlightType(ModuleAttribute.kt:250)
	at org.elixir_lang.annotator.ModuleAttribute.access$highlightType(ModuleAttribute.kt:31)
	at org.elixir_lang.annotator.ModuleAttribute$annotate$1.visitDeclaration(ModuleAttribute.kt:84)
	at org.elixir_lang.annotator.ModuleAttribute$annotate$1.visitElement(ModuleAttribute.kt:61)
	at com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:273)
	at org.elixir_lang.psi.impl.ElixirUnmatchedAtUnqualifiedNoParenthesesCallImpl.accept(ElixirUnmatchedAtUnqualifiedNoParenthesesCallImpl.java:40)
	at org.elixir_lang.annotator.ModuleAttribute.annotate(ModuleAttribute.kt:47)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:134)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:114)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:335)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:268)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:294)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:94)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:297)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:265)
	at com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:211)
	at com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84)
	at com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:56)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$1(PassExecutorService.java:399)
	at com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1078)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:392)
	at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:705)
	at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:647)
	at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:63)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:391)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:367)
	at com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:174)
	at com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:183)
	at com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:365)
	at com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:188)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
	at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183)

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions