Hygenic Renaming Failure (const + missing semicolons + readableNames)
Created by: Havvy
Input:
let describe = macro {
rule { $name:lit { $body ... } } => {
describe($name, function () {
$body ...
});
}
}
const binding = {}
const binding_fails = {}
describe 'failure' {
binding_fails;
}
undescribe('failure', function () {
binding_fails;
});
Output:
const binding = {};
const binding_fails = {};
describe('failure', function () {
binding_fails$280;
});
undescribe('failure', function () {
binding_fails;
});
Crucial note: Adding semicolons to the end of the const statements 'fixes' this issue.
Problem is not reproducible with readable names off.