Commit 38e42d9
Implement eval-able AnnotatedString 2-arg show (#54308)
The generic/fallback AbstractString 2-arg show omits the annotations,
meaning that eval(Meta.parse(repr(::AnnotatedString))) doesn't
round-trip.
The resolution to this is fairly simple, we just need to implement a
specialised show method. The implementation is fairly obvious, we're
just also able to get away with hiding the vector type annotation since
the constructor is fine without it.
(cherry picked from commit cc26f4a)1 parent 6fc6eb0 commit 38e42d9
2 files changed
+20
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
159 | 159 | | |
160 | 160 | | |
161 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
162 | 178 | | |
163 | 179 | | |
164 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
61 | 65 | | |
62 | 66 | | |
63 | 67 | | |
| |||
0 commit comments