Precedence of tagged template over new is broken by compilation
- Dominant language
- JavaScript
- Stars
- 874
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
Input
```js
new tag`second template`('constructor argument')
```
Output
```js
var templateObject = Object.freeze(["second template"]);
new tag(templateObject)('constructor argument')
```
This is correct, though:
```js
tag`second template`('constructor argument')
```
Output
```js
var templateObject = Object.freeze(["second template"]);
tag(templateObject)('constructor argument')
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing the compiler output for `new tag\`second template\`('constructor argument')` and compare it with the working `tag\`second template\`('constructor argument')` case shown in the issue. Trace the tagged-template transformation and verify that the compiled result preserves the precedence of `new` over the tagged template call.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100