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

RESOLVED FIXED in 1.0

Status

P3
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: stas, Assigned: stas)

Tracking

unspecified
x86_64
Linux

Details

(Assignee)

Description

5 years ago
<identity($n) { $n }>

<thisFails "{{ identitiy() }}">
(Assignee)

Updated

5 years ago
Priority: -- → P3
Target Milestone: --- → 1.0
(Assignee)

Comment 1

5 years ago
When ctxdata = { n: 1 }, should thisFails in comment 0 return 1?
(Assignee)

Updated

5 years ago
Assignee: nobody → stas
(Assignee)

Updated

5 years ago
Depends on: 881646
(Assignee)

Comment 2

5 years ago
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
Last Resolved: 5 years ago
Flags: needinfo?(gandalf)
Resolution: --- → FIXED
(Assignee)

Comment 3

5 years ago
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.