hare

[hare] The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit d39b6f22cb55f94418a7907ef593635a750a6072
parent e8a3a87932dfbdf3a4c3235d1d5cfe3c000fae06
Author: Sebastian <sebastian@sebsite.pw>
Date:   Thu,  5 May 2022 17:36:06 -0400

haretype: use implicit subtyping for stream

Signed-off-by: Sebastian <sebastian@sebsite.pw>

Diffstat:
Mcmd/haretype/main.ha | 5++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/cmd/haretype/main.ha b/cmd/haretype/main.ha @@ -22,9 +22,8 @@ fn typeinfo( yield types::lookup_builtin(store, ast::builtin_type::NULL); } else { const stream = bufio::fixed(strings::toutf8(s), io::mode::READ); - const stream = &stream.stream; - defer io::close(stream)!; - const lexer = lex::init(stream, "-"); + defer io::close(&stream)!; + const lexer = lex::init(&stream, "-"); const atype = parse::_type(&lexer)?; defer ast::type_finish(atype); const typ = types::lookup(store, &atype)?;