Commit 67f7c6b
Fix bug with edge-case when converting to algebra quoted Elixir alias (#11572)
The following code would crash:
iex> Code.quoted_to_algebra(Elixir)
** (MatchError) no match of right hand side value: "Elixir"
(elixir 1.13.1) lib/code/normalizer.ex:254: Code.Normalizer.normalize_literal/3
(elixir 1.13.1) lib/code.ex:1107: Code.quoted_to_algebra/2
Therefore, this as well:
iex> Macro.to_string(Elixir)
** (MatchError) no match of right hand side value: "Elixir"
(elixir 1.13.1) lib/code/normalizer.ex:254: Code.Normalizer.normalize_literal/3
(elixir 1.13.1) lib/code.ex:1107: Code.quoted_to_algebra/2
(elixir 1.13.1) lib/macro.ex:948: Macro.to_string/11 parent c99a17b commit 67f7c6b
File tree
5 files changed
+16
-5
lines changed- lib/elixir
- lib/code
- test/elixir
- code_normalizer
- kernel
5 files changed
+16
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
251 | 251 | | |
252 | 252 | | |
253 | 253 | | |
254 | | - | |
255 | | - | |
256 | 254 | | |
257 | | - | |
258 | | - | |
259 | | - | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
260 | 264 | | |
261 | 265 | | |
262 | 266 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
118 | 119 | | |
119 | 120 | | |
120 | 121 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
620 | 620 | | |
621 | 621 | | |
622 | 622 | | |
| 623 | + | |
623 | 624 | | |
624 | 625 | | |
625 | 626 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 523 | | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
524 | 527 | | |
525 | 528 | | |
526 | 529 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
326 | 326 | | |
327 | 327 | | |
328 | 328 | | |
| 329 | + | |
| 330 | + | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| |||
0 commit comments