fix(frontends/lean/builtin_cmds): bug in export
command
Cause: we have two different tokes to represent declarations: [decls] and [declarations] fixes #568
This commit is contained in:
parent
b39fe17dee
commit
8c107d6936
2 changed files with 17 additions and 0 deletions
|
@ -602,6 +602,8 @@ static void parse_metaclasses(parser & p, buffer<name> & r) {
|
|||
while (p.curr_is_token(get_lbracket_tk())) {
|
||||
name m = parse_metaclass(p);
|
||||
tmp.erase_elem(m);
|
||||
if (m == get_declarations_tk())
|
||||
tmp.erase_elem(get_decls_tk());
|
||||
}
|
||||
r.append(tmp);
|
||||
} else {
|
||||
|
|
15
tests/lean/run/568.lean
Normal file
15
tests/lean/run/568.lean
Normal file
|
@ -0,0 +1,15 @@
|
|||
namespace f1
|
||||
definition flip := 20
|
||||
end f1
|
||||
|
||||
namespace f2
|
||||
definition flip := 10
|
||||
end f2
|
||||
|
||||
namespace f3
|
||||
export [declarations] f1
|
||||
export -[declarations] f2
|
||||
end f3
|
||||
|
||||
export [declarations] f1
|
||||
export -[declarations] f2
|
Loading…
Reference in a new issue