Analyzer: Fixed several FunctionAnalyzer bugs #1332
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Made several FunctionAnalyzer changes and bug fixes:
resolves #1320 -- 'System.ArgumentException' with message 'Syntax node is not within syntax tree'. due to SemanticModel being passed around without getting new SemanticModel for the node being analyzed
resolves #1322 -- Bug where ReturnTypeAnalyzer didn't properly handle function return types of Task when T was a mismatch JsonArray serialized type (types that implement IEnumerable)
resolves #1324 -- Bug where ValueTuples would be incorrectly labeled as Tuples causing incorrect warnings when using ValueTuples
Adds logic to ArgumentAnalyzer to allow passed input to be a subclass or implementation of the defined input.
Adds logic to ReturnTypeAnalzyer to allow expected return type to be a base/interface for the defined return type.
Updated all FunctionAnalyzer tests to remove clutter and to clearly define test cases. This change will make adding to tests easier and, especially, reading and reviewing test code to be a much more enjoyable process.