summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
author"S. Gilles" <sgilles@umd.edu>2019-12-01 15:58:44 +0000
committer"S. Gilles" <sgilles@umd.edu>2019-12-01 15:58:44 +0000
commit6d707df71c0fe11da7dd53bf36eb3d3fadb8ec9b (patch)
tree5ddf3d868453fe57fe20d115d8345641e372d680 /lib
parentebeb642003c6fdbf331968cff9d2e3d769fd6b02 (diff)
downloadmc-6d707df71c0fe11da7dd53bf36eb3d3fadb8ec9b.tar.gz
[PATCH v2 4/3] Somewhat better error for std.put("{w=?}", "foo")
Diffstat (limited to 'lib')
-rw-r--r--lib/std/fmt.myr4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/std/fmt.myr b/lib/std/fmt.myr
index 4178524..4a70c21 100644
--- a/lib/std/fmt.myr
+++ b/lib/std/fmt.myr
@@ -593,6 +593,10 @@ const getint = {s, msg
}
const pullint = {ap, msg
+ if ap.tc.nelt < 1
+ die("expected argument where none was provided")
+ ;;
+
match typedesc(vatype(ap))
| `Tyint8:
var val : int8 = vanext(ap)