Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Weak type errors for primitives#16343

Merged
sandersn merged 4 commits into
mastermicrosoft/TypeScript:masterfrom
weak-types-for-primitivesmicrosoft/TypeScript:weak-types-for-primitivesCopy head branch name to clipboard
Jun 9, 2017
Merged

Weak type errors for primitives#16343
sandersn merged 4 commits into
mastermicrosoft/TypeScript:masterfrom
weak-types-for-primitivesmicrosoft/TypeScript:weak-types-for-primitivesCopy head branch name to clipboard

Conversation

@sandersn

@sandersn sandersn commented Jun 7, 2017

Copy link
Copy Markdown
Member

Fixes #16333

Previously, weak type errors didn't occur with primitive sources because the apparent type of primitives all include toString. isKnownProperty reports that toString is known for all types because it falls back to globalObjectType when it can't find the property on the given type.

@sandersn sandersn changed the title Weak types for primitives Weak type errors for primitives Jun 7, 2017
sandersn added 2 commits June 8, 2017 09:01
It doesn't make sense to say that 'toString' is part of a weak type
since having 'toString' would mean that the type isn't actually weak.
@sandersn sandersn merged commit cae1286 into master Jun 9, 2017
@sandersn sandersn deleted the weak-types-for-primitives branch June 9, 2017 16:03
@sandersn sandersn mentioned this pull request Jul 6, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.