Skip to content

Type arguments to formatStringFromArgs as strings instead of implicitly stringifying#11709

Merged
2 commits merged into
masterfrom
compiler_diagnostic_strings
Oct 18, 2016
Merged

Type arguments to formatStringFromArgs as strings instead of implicitly stringifying#11709
2 commits merged into
masterfrom
compiler_diagnostic_strings

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Oct 18, 2016

I noticed some [object Object] showing up while making new diagnostic messages. This will help catch that error.

@ghost ghost force-pushed the compiler_diagnostic_strings branch from 49b201e to 1f7f67d Compare October 18, 2016 15:49
Comment thread src/compiler/checker.ts Outdated
if (!type) {
if (isTupleType(parentType)) {
error(declaration, Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2, typeToString(parentType), getTypeReferenceArity(<TypeReference>parentType), pattern.elements.length);
error(declaration, Diagnostics.Tuple_type_0_with_length_1_cannot_be_assigned_to_tuple_with_length_2,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this seems like an overkill to me. can we make it string|number instead?

@ghost ghost force-pushed the compiler_diagnostic_strings branch from ff285ca to 8dc9523 Compare October 18, 2016 18:54
Copy link
Copy Markdown
Contributor

@mhegazy mhegazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@ghost ghost merged commit f08cfda into master Oct 18, 2016
@ghost ghost deleted the compiler_diagnostic_strings branch October 18, 2016 19:25
@microsoft microsoft locked and limited conversation to collaborators Jun 19, 2018
This pull request was closed.
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.

2 participants