TypeScript/tests/cases/conformance
Nathan Shively-Sanders eb105efdcd
Avoid circular reference in this-property assignments (#37827)
* Avoid circular reference in this-property assignments

To do this, don't check this-property assigments that have the
this-property of the lhs appearing somewhere on the rhs:

```js
class C {
  m() {
    this.x = 12
    this.x = this.x + this.y
  }
}
```

I tried suppressing the circularity error, but because we cache the
first type discovered for a property, this still results in an implicit
any for `x` in the previous example. It just doesn't have an error.

Fixes #35099

* Add test case + rename function

* Use isMatchingReference
2020-04-10 16:41:31 -07:00
..
ambient Add bad test case 2019-04-24 08:44:24 -07:00
async Fix async function block return expr error in js (#37845) 2020-04-08 15:26:56 -07:00
classes Exempt ambient private properties from noImplicitAny (#36640) 2020-02-14 15:01:18 -08:00
constEnums fix compiler crash (#25925) 2019-04-25 10:51:36 -07:00
controlFlow Support for/of variables in assertion checking (#37432) 2020-03-17 19:20:56 -07:00
declarationEmit Merge branch 'master' into attach_property_to_default_export 2019-03-22 17:40:37 +08:00
decorators Fix metadata serialization for invalid jsdoc types (#37836) 2020-04-08 12:06:40 -07:00
directives Added @ts-expect-error to @ts-ignore directives (#36014) 2020-03-05 10:37:36 -05:00
dynamicImport Fix parenthesization rules for yield (#37849) 2020-04-09 13:17:46 -07:00
emitter
enums disallow 'await' and 'yield' in property and enum member initializer (#34892) 2019-11-14 17:44:48 -08:00
es6 Fix initialization error when destructuring from object literal that includes a spread assignment (#36865) 2020-02-19 08:28:12 -08:00
es7
es2017
es2018 add support for Lift Template Literal Restriction (#23801) 2020-02-05 08:59:51 -08:00
es2019 Fix crash when exporting+aliasing globalThis inside declare global (#34408) 2019-10-15 14:05:39 -07:00
es2020/modules Error on invalid uses of namespace export (#37715) 2020-04-09 09:42:16 -07:00
expressions Fix emit for optional chain with non-null assertion (#36539) 2020-03-25 15:28:13 -07:00
externalModules Fix longer type-only property access in non-emitting heritage clauses (#37264) 2020-03-09 12:05:36 -07:00
functions Fix ThisParameterType<T> type (#36013) 2020-01-06 08:55:34 -10:00
generators Get contextual type of yield from contextual signature of containing function (#32433) 2019-07-16 17:16:21 -07:00
interfaces getConstraintDeclaration gets the first declaration with a constraint… (#33426) 2019-09-18 13:56:24 -07:00
internalModules
jsdoc Use comments from host variable declaration when exporting a signature in js declarations (#37594) 2020-04-08 13:32:17 -07:00
jsx fix(37456): add tests for JsxOpeningElement nodes (#37752) 2020-04-02 10:38:31 -07:00
moduleResolution Fix handling of empty 'types', 'typings', etc. fields in package.json (#31539) 2019-05-23 17:19:32 -07:00
parser fix spelling errors (#36523) 2020-01-30 13:39:54 -08:00
references
salsa Avoid circular reference in this-property assignments (#37827) 2020-04-10 16:41:31 -07:00
scanner Add error message for keywords with escapes in them (#32718) 2019-08-12 16:00:38 -07:00
statements Reset error record in downlevel for-of (#31519) 2019-05-22 11:18:07 -07:00
Symbols
types Remove error when spreading optional any (#37757) 2020-04-02 15:04:45 -07:00
typings
fixSignatureCaching.ts
inferFromBindingPattern.ts Make no inferences from binding patterns with no defaults (#35454) 2019-12-05 07:09:45 -08:00