KronicDeth / intellij-elixir

Elixir plugin for JetBrain's IntelliJ Platform (including Rubymine)
Other
1.83k stars 153 forks source link

Cannot highlight binary literal (0bBBB) in types #1549

Closed robinhilliard closed 1 year ago

robinhilliard commented 5 years ago

Description

Very large generated file - editor was open, was not editing at the time of error. Ta.

Exception

Message

Cannot highlight types

Excerpt

0b1

Line(s) 4188-4188 in /workspaces/elixir/mavlink/lib/Mavlink.ex

Element Class Name

org.elixir_lang.psi.impl.ElixirBinaryWholeNumberImpl

Stacktrace

``` org.elixir_lang.errorreport.Logger.error(Logger.java:51) org.elixir_lang.errorreport.Logger.error(Logger.java:34) org.elixir_lang.annotator.ModuleAttribute.error(ModuleAttribute.java:145) org.elixir_lang.annotator.ModuleAttribute.cannotHighlightTypes(ModuleAttribute.java:141) org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.java:1195) org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.java:1206) org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.java:1063) org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.java:1017) org.elixir_lang.annotator.ModuleAttribute.highlightTypesAndTypeParameterUsages(ModuleAttribute.java:1125) org.elixir_lang.annotator.ModuleAttribute.highlightSpecification(ModuleAttribute.java:612) org.elixir_lang.annotator.ModuleAttribute.highlightSpecification(ModuleAttribute.java:254) org.elixir_lang.annotator.ModuleAttribute.access$400(ModuleAttribute.java:38) org.elixir_lang.annotator.ModuleAttribute$1.visitDeclaration(ModuleAttribute.java:101) org.elixir_lang.annotator.ModuleAttribute$1.visitElement(ModuleAttribute.java:72) com.intellij.psi.impl.PsiElementBase.accept(PsiElementBase.java:274) org.elixir_lang.psi.impl.ElixirUnmatchedAtUnqualifiedNoParenthesesCallImpl.accept(ElixirUnmatchedAtUnqualifiedNoParenthesesCallImpl.java:39) org.elixir_lang.annotator.ModuleAttribute.annotate(ModuleAttribute.java:55) com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.runAnnotators(DefaultHighlightVisitor.java:121) com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.visit(DefaultHighlightVisitor.java:86) com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.runVisitors(GeneralHighlightingPass.java:351) com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$collectHighlights$5(GeneralHighlightingPass.java:290) com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:311) com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.lambda$analyzeByVisitors$6(GeneralHighlightingPass.java:314) com.intellij.codeInsight.daemon.impl.DefaultHighlightVisitor.analyze(DefaultHighlightVisitor.java:70) com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.analyzeByVisitors(GeneralHighlightingPass.java:314) com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectHighlights(GeneralHighlightingPass.java:281) com.intellij.codeInsight.daemon.impl.GeneralHighlightingPass.collectInformationWithProgress(GeneralHighlightingPass.java:225) com.intellij.codeInsight.daemon.impl.ProgressableTextEditorHighlightingPass.doCollectInformation(ProgressableTextEditorHighlightingPass.java:84) com.intellij.codeHighlighting.TextEditorHighlightingPass.collectInformation(TextEditorHighlightingPass.java:55) com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$null$1(PassExecutorService.java:429) com.intellij.openapi.application.impl.ApplicationImpl.tryRunReadAction(ApplicationImpl.java:1106) com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$doRun$2(PassExecutorService.java:422) com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:591) com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:537) com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:59) com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.doRun(PassExecutorService.java:421) com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.lambda$run$0(PassExecutorService.java:397) com.intellij.openapi.application.impl.ReadMostlyRWLock.executeByImpatientReader(ReadMostlyRWLock.java:164) com.intellij.openapi.application.impl.ApplicationImpl.executeByImpatientReader(ApplicationImpl.java:204) com.intellij.codeInsight.daemon.impl.PassExecutorService$ScheduledPass.run(PassExecutorService.java:395) com.intellij.concurrency.JobLauncherImpl$VoidForkJoinTask$1.exec(JobLauncherImpl.java:161) java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177) ```
robinhilliard commented 5 years ago

Lines 4188-4189:

  @spec encode(Mavlink.Types.adsb_emitter_type, :adsb_emitter_type) :: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19
  @spec encode(Mavlink.Types.adsb_flags, :adsb_flags) :: 0b1 | 0b10 | 0b100 | 0b1000 | 0b10000 | 0b100000 | 0b1000000

Apparently has problem with 0b1 - if you could help me with 0b1, you're my only hope. ;-)