GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve error message for `==` of two different types · Pull Request #27227 · microsoft/TypeScript

Conversation

@ghost

@ghost Deleted user (ghost) commented Sep 19, 2018

Copy link
Copy Markdown

Fixes #26592

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@ghost
ghost requested a review from Daniel Rosenwasser (DanielRosenwasser) September 19, 2018 23:55
@ghost
ghost force-pushed the equals_error branch from 7f039c9 to a57c9a7 Compare September 19, 2018 23:57
Andy Hanson
Improve error message for == of two different types
b36e5de
@ghost
ghost force-pushed the equals_error branch from a57c9a7 to b36e5de Compare September 20, 2018 00:37
@iliashkolyar

iliashkolyar commented Sep 20, 2018

Copy link
Copy Markdown
Contributor

Andy (Andrewkraft) (@Andy-MS)
If i'm not mistaken, this fix will not handle literal type comparisons such as:

var a = (1 == "1");
var b = ("" == 0);
var c = (false == "");
var d = (false == 0);

All of the above are also runtime comparisons that will yield "This condition will always return 'false'" mistakenly.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Andy Hanson
Handle literals and literal unions
107cb98
@ghost
ghost force-pushed the equals_error branch from 3622e9a to 107cb98 Compare September 20, 2018 23:17
Andy Hanson
Merge branch 'master' into equals_error
dafd33e
@ghost

Deleted user (ghost) commented Oct 22, 2018

Copy link
Copy Markdown
Author

Daniel Rosenwasser (@DanielRosenwasser) Please review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ghost ghost assigned Daniel Rosenwasser (DanielRosenwasser) Nov 16, 2018
Andy Hanson
Merge branch 'master' into equals_error
405478e
@ghost
ghost force-pushed the equals_error branch from 3321364 to 405478e Compare November 16, 2018 01:11
@sandersn Nathan Shively-Sanders (sandersn) added the For Backlog Bug PRs that fix a backlog bug label Feb 1, 2020
@sandersn
Nathan Shively-Sanders (sandersn) requested review from Eli Barzilay (elibarzilay) and Orta Therox (orta) March 10, 2020 00:05
@sandersn Nathan Shively-Sanders (sandersn) assigned Eli Barzilay (elibarzilay) and unassigned Daniel Rosenwasser (DanielRosenwasser) Mar 10, 2020
@elibarzilay

Eli Barzilay (elibarzilay) commented Jul 21, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

I rebased it up the history in small steps, and it worked fine with obvious fixes, until 48fc6b8 (from #32239) which edits the same code to something different, so making this work will require actually redoing it. (It looks like the main issue is that 48fc6b8 extends tryGiveBetterPrimaryError whereas this one removes it.)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elibarzilay

Eli Barzilay (elibarzilay) commented Jul 21, 2020

Copy link
Copy Markdown
Contributor

Talked to Ryan Cavanaugh (@RyanCavanaugh), seems not worth the effort of reviving.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@elibarzilay Eli Barzilay (elibarzilay) closed this Jul 21, 2020
@RyanCavanaugh
Ryan Cavanaugh (RyanCavanaugh) deleted the equals_error branch October 25, 2022 20:18
@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 21, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) Awaiting requested review from DanielRosenwasser
@elibarzilay Eli Barzilay (elibarzilay) Awaiting requested review from elibarzilay
@orta Orta Therox (orta) Awaiting requested review from orta

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@elibarzilay Eli Barzilay (elibarzilay)

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

PR Backlog
Archived in project

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

"This condition will always return 'false'" but returns true at runtime

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@iliashkolyar @elibarzilay @sandersn @DanielRosenwasser
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.