Skip to content

Expected noImplicitAny error on 4.0 control flow analyzed static class properties #39226

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
DanielRosenwasser opened this issue Jun 24, 2020 · 0 comments · Fixed by #39252
Closed
Assignees
Labels
Bug A bug in TypeScript Domain: Control Flow The issue relates to control flow analysis Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this

Comments

@DanielRosenwasser
Copy link
Member

DanielRosenwasser commented Jun 24, 2020

// @noImplicitAny: true
class Square {
    static sideLength;
    constructor(sideLength: number) {
        this.sideLength = sideLength;
    }
}

Expected

Two errrors:

Member 'sideLength' implicitly has an 'any' type.
Property 'sideLength' is a static member of type 'Square'

Actual

One error

Property 'sideLength' is a static member of type 'Square'
@DanielRosenwasser DanielRosenwasser changed the title Expected more errors from 4.0 control flow analyzed static class properties Expected noImplicitAny error on from 4.0 control flow analyzed static class properties Jun 24, 2020
@DanielRosenwasser DanielRosenwasser changed the title Expected noImplicitAny error on from 4.0 control flow analyzed static class properties Expected noImplicitAny error on 4.0 control flow analyzed static class properties Jun 24, 2020
@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this Domain: Control Flow The issue relates to control flow analysis labels Jun 24, 2020
@DanielRosenwasser DanielRosenwasser added this to the Typescript 4.0.1 milestone Jun 24, 2020
ShuiRuTian added a commit to ShuiRuTian/TypeScript that referenced this issue Jun 25, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Bug A bug in TypeScript Domain: Control Flow The issue relates to control flow analysis Effort: Moderate Requires experience with the TypeScript codebase, but feasible. Harder than "Effort: Casual". Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants