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

Treat default value None as nothing#680

Merged
MikhailArkhipov merged 2 commits into
microsoft:masterfrom
MikhailArkhipov:604
Feb 28, 2019
Merged

Treat default value None as nothing#680
MikhailArkhipov merged 2 commits into
microsoft:masterfrom
MikhailArkhipov:604

Conversation

@MikhailArkhipov

Copy link
Copy Markdown

Fixes #604

Treat default value None as nothing since it is not a parameter type but just says the parameter may be missing.

if (src != null && dst is PythonType pt) {
pt.TrySetTypeId(dst.TypeId);
public static void TransferDocumentationAndLocation(this IPythonType s, IPythonType d) {
if (s != null && s != d && s is PythonType src && d is PythonType dst) {

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.

I think we don't need s != null check here. Pattern matching will fail for s == null

@MikhailArkhipov MikhailArkhipov merged commit 515c114 into microsoft:master Feb 28, 2019
@MikhailArkhipov MikhailArkhipov deleted the 604 branch March 1, 2019 20:00
jakebailey pushed a commit to jakebailey/python-language-server that referenced this pull request Nov 1, 2019
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