diff options
author | Eduardo Julian | 2017-10-08 00:52:57 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-10-08 00:52:57 -0400 |
commit | 272b8960b1247d04e1e1bdec6e0269114d5d1844 (patch) | |
tree | a361bf85e9aedf5f12b1f3d30a73f28beb4c3680 /new-luxc/source/luxc/analyser/procedure/common.lux | |
parent | 39170dd3514cbca9299146af8965f2764ba0fb4a (diff) |
- WIP: JVM field analysis.
Diffstat (limited to 'new-luxc/source/luxc/analyser/procedure/common.lux')
-rw-r--r-- | new-luxc/source/luxc/analyser/procedure/common.lux | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/new-luxc/source/luxc/analyser/procedure/common.lux b/new-luxc/source/luxc/analyser/procedure/common.lux index c1ca36b17..ffb87a2ca 100644 --- a/new-luxc/source/luxc/analyser/procedure/common.lux +++ b/new-luxc/source/luxc/analyser/procedure/common.lux @@ -33,9 +33,9 @@ (list/map (function [[key val]] [(format prefix " " key) val])) (d;from-list text;Hash<Text>))) -(def: #export (wrong-amount-error proc expected actual) +(def: #export (wrong-arity proc expected actual) (-> Text Nat Nat Text) - (format "Wrong number of arguments for " (%t proc) "\n" + (format "Wrong arity for " (%t proc) "\n" "Expected: " (|> expected nat-to-int %i) "\n" " Actual: " (|> actual nat-to-int %i))) @@ -55,7 +55,7 @@ _ (&;within-type-env (TC;check expected output-type))] (wrap (#la;Procedure proc argsA))) - (&;fail (wrong-amount-error proc num-expected num-actual))))))) + (&;fail (wrong-arity proc num-expected num-actual))))))) (def: #export (nullary valueT proc) (-> Type Text Proc) @@ -103,7 +103,7 @@ (wrap (#la;Procedure proc (list opA)))) _ - (&;fail (wrong-amount-error proc +1 (list;size args)))))))) + (&;fail (wrong-arity proc +1 (list;size args)))))))) (def: lux-procs Bundle @@ -296,7 +296,7 @@ (wrap (#la;Procedure proc (list initA)))) _ - (&;fail (wrong-amount-error proc +1 (list;size args)))))))) + (&;fail (wrong-arity proc +1 (list;size args)))))))) (def: (atom-read proc) (-> Text Proc) |