From 145a078387b8bce5e8e3c93c333c030aa7455e4c Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 9 Nov 2024 17:26:01 -0500 Subject: Make the compiler stricter about not promoting local value variables to pointers --- examples/ini/ini.tm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/ini') diff --git a/examples/ini/ini.tm b/examples/ini/ini.tm index 4e5ec776..5952bb00 100644 --- a/examples/ini/ini.tm +++ b/examples/ini/ini.tm @@ -8,7 +8,7 @@ _HELP := " func parse_ini(path:Path -> {Text:{Text:Text}}): text := path:read() or exit("Could not read INI file: $\[31;1]$(path.text_content)$\[]") - sections := {:Text:@{Text:Text}} + sections := @{:Text:@{Text:Text}} current_section := @{:Text:Text} # Line wraps: @@ -26,7 +26,7 @@ func parse_ini(path:Path -> {Text:{Text:Text}}): value := line:replace($/{..}={..}/, "\2"):trim() current_section:set(key, value) - return {k:v[] for k,v in sections} + return {k:v[] for k,v in sections[]} func main(path:Path, key:Text?): keys := (key or ""):split($|/|) -- cgit v1.2.3