Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix decompilation of Kernel that causes syntax highlighting crashes #1877

Merged
merged 8 commits into from
Jan 15, 2021
Prev Previous commit
Next Next commit
Use correct macro for signature from docs
Ensures that defmacro is used for macros instead of hard-coding `def` as before.
  • Loading branch information
KronicDeth committed Jan 15, 2021
commit ad4730dea23ffb22ba3873669f081f11176dce1d
2 changes: 1 addition & 1 deletion src/org/elixir_lang/beam/Decompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ private static void appendCallDefinitions(@NotNull StringBuilder decompiled,
? documentation.getDocs().getSignatures(macroNameArity.name, macroNameArity.arity)
: null;
if (signaturesFromDocs != null && !signaturesFromDocs.isEmpty()){
decompiled.append(" def ");
decompiled.append(" ").append(macroNameArity.macro).append(' ');
Optional<String> optional = signaturesFromDocs.stream().findFirst();
decompiled.append(optional.get());
decompiled.append(" do\n # body not decompiled\n end\n");
Expand Down