Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Make tuples with different arguments different types#198

Merged
MikhailArkhipov merged 3 commits into
microsoft:masterfrom
MikhailArkhipov:master
Oct 5, 2018
Merged

Make tuples with different arguments different types#198
MikhailArkhipov merged 3 commits into
microsoft:masterfrom
MikhailArkhipov:master

Conversation

@MikhailArkhipov
Copy link
Copy Markdown

Fixes #173

Tuple protocols are compared by name which makes tuples with different types the same, which causes trouble in analysis hash set when it merges types of function parameters in overloads.

}

public override string Name => "tuple";
public override string Name => "tuple[{0}]".FormatInvariant(string.Join(", ", _values.Select(v => v.GetShortDescriptions())));
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.

We can save it ctor to avoid multiple string creation.

@lostmsu
Copy link
Copy Markdown
Contributor

lostmsu commented Oct 4, 2018

Is short description unique enough? Should not FullyQualifiedName be used?

@MikhailArkhipov
Copy link
Copy Markdown
Author

@lostmsu - sure, why not

@lostmsu
Copy link
Copy Markdown
Contributor

lostmsu commented Oct 5, 2018

@MikhailArkhipov FYI, just pulled this PR locally. Whatever issue I had with the assert is gone.

@MikhailArkhipov MikhailArkhipov merged commit 565e23e into microsoft:master Oct 5, 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