mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 11:35:42 -06:00
Add explanatory comment when adding ContainsLexicalThisInComputedPropertyName
This commit is contained in:
parent
8fa44c3b06
commit
e5e8c6b0b9
@ -1911,6 +1911,9 @@ namespace ts {
|
||||
// Instead, we mark the container as ES6, so that it can properly handle the transform.
|
||||
transformFlags = TransformFlags.ContainsComputedPropertyName;
|
||||
if (subtreeFlags & TransformFlags.ContainsLexicalThis) {
|
||||
// A computed method name that contains `this` needs to
|
||||
// distinguish itself from the normal case of a method body containing `this`.
|
||||
// So convert ContainsLexicalThis to ContainsLexicalThisInComputedPropertyName
|
||||
transformFlags |= TransformFlags.ContainsLexicalThisInComputedPropertyName;
|
||||
}
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user