Skip to content

Commit a1e9abb

Browse files
authored
Don't suppress reading record and custom data reader types (#948)
Fixes #947
1 parent 04f74cd commit a1e9abb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2626
* Fix a bug where `basilisp.lang.seq.LazySeq` instances were not thread-safe (#934)
2727
* Fix a bug where Seqs wrapping Python Iterable instances were not thread-safe (#936)
2828
* Fix several bugs where code was being executed from a string with interpolated variables, which could've allowed for code (#938)
29+
* Fix a bug where record types and data readers whose fully qualified name started with a "b" could not be read (#947)
2930

3031
### Other
3132
* Add several sections to Concepts documentation module (#666)

src/basilisp/lang/reader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,12 +1547,12 @@ def _read_reader_macro(ctx: ReaderContext) -> LispReaderForm: # noqa: MC0001
15471547
raise ctx.syntax_error(e.message).with_traceback(e.__traceback__) from None
15481548
elif char == "#":
15491549
return _read_numeric_constant(ctx)
1550-
elif char == "b":
1551-
ctx.reader.advance()
1552-
return _read_byte_str(ctx)
15531550
elif ns_name_chars.match(char):
15541551
s = _read_sym(ctx)
15551552
assert isinstance(s, sym.Symbol)
1553+
if s.ns is None and s.name == "b":
1554+
return _read_byte_str(ctx)
1555+
15561556
v = _read_next_consuming_comment(ctx)
15571557
if s in ctx.data_readers:
15581558
f = ctx.data_readers[s]

0 commit comments

Comments
 (0)