Skip to content

LGTM.com - false positive #2621

@ljharb

Description

@ljharb

Description of the false positive

Strict mode can not use arguments.callee, this is true, but i'm using it inside a try/catch explicitly to trigger the exception.

https://lgtm.com/projects/g/ljharb/es-abstract/snapshot/a0800679d508ef15d31fe84283fc6a522277ca23/files/GetIntrinsic.js?sort=name&dir=ASC&mode=heatmap#xbd19a52cddeabb11:1

It's also marked as "has no effect", but it throws an exception in strict mode code, which is quite a strong effect.

https://lgtm.com/projects/g/ljharb/es-abstract/snapshot/a0800679d508ef15d31fe84283fc6a522277ca23/files/GetIntrinsic.js?sort=name&dir=ASC&mode=heatmap#xbd19a52cddeabb11:1

In other words, I think that both of these should never show up for arguments.callee. In sloppy mode, this is a noop expression; in strict mode, it has an effect (and ideally it should be permitted as a noop expression inside a try/catch)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions