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

Fix existing and potentil null references - #92

Merged
Mikhail Arkhipov (MikhailArkhipov) merged 7 commits into
microsoft:masterfrom
MikhailArkhipov:84
Sep 13, 2018
Merged

Mikhail Arkhipov (MikhailArkhipov) merged 7 commits into
microsoft:masterfrom
MikhailArkhipov:84

Conversation

@MikhailArkhipov

Copy link
Copy Markdown

Basically stems out of #87

  • Remove BasesInternal and use Bases
  • Ditto for Parameters and Decorators
  • Return empty arrays rather than nulls
  • Use MaybeEnumerate where appropriate
  • Add and use ExceptDefault()

@@ -61,25 +63,18 @@ public ExtractMethodResult GetExtractionResult() {
if (_targetScope is ClassDefinition) {
var fromScope = _scopes[_scopes.Count - 1] as FunctionDefinition;

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.

Maybe use pattern matching here:

if (_targetScope is ClassDefinition && _scopes[_scopes.Count - 1] is FunctionDefinition fromScope)

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