Closed Bug 884201 Opened 11 years ago Closed 11 years ago

Compiler: macros should fail gracefully if no required arguments are passed

Categories

(L20n :: JS Library, defect, P3)

x86_64
Linux
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: stas, Assigned: stas)

References

Details

<identity($n) { $n }>

<thisFails "{{ identitiy() }}">
Priority: -- → P3
Target Milestone: --- → 1.0
When ctxdata = { n: 1 }, should thisFails in comment 0 return 1?
Assignee: nobody → stas
Depends on: 881646
I went for failing early:  Macro::_call compares the number of arguments passed with the macro's arity.  Comment 1 throws.

https://github.com/l20n/l20n.js/commit/322e08705568384a82225ff5631c866c6b79ac2e
Status: NEW → RESOLVED
Closed: 11 years ago
Flags: needinfo?(gandalf)
Resolution: --- → FIXED
Sorry, didn't mean to needinfo you.
Flags: needinfo?(gandalf)
You need to log in before you can comment on or make changes to this bug.