Skip to content

Failed check on function in if clause #19026

Closed
@huhuanming

Description

@huhuanming

TypeScript Version: 2.5.3

Code

if (Math.floor(1.2), 2) {
   // do something
}

Expected behavior:

error TS2695: Left side of comma operator is unused and has no side effects.

Actual behavior:

image

Nothing happened.

But can get error like this.

image

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