Skip to content

No error when using uninitialized value in noImplicitAny & strictNullChecks mode #12002

Closed
@DanielRosenwasser

Description

@DanielRosenwasser

From master as of right now (7b34b612beda66b0812462a3feeabc63852cd842)

var x;
var y = 100 + x;

Compile with strictNullChecks and noImplicitAny

Expected: Some sort of error for using x.
Actual: No error at all?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions