Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Analyzer: Fixed several FunctionAnalyzer bugs #1332

Merged
merged 4 commits into from
May 6, 2020
Merged

Analyzer: Fixed several FunctionAnalyzer bugs #1332

merged 4 commits into from
May 6, 2020

Conversation

amdeel
Copy link
Contributor

@amdeel amdeel commented Apr 21, 2020

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.

@amdeel amdeel changed the title Analyzer: Fixed several Bugs Analyzer: Fixed several FunctionAnalyzer bugs Apr 21, 2020
@amdeel amdeel requested a review from ConnorMcMahon April 21, 2020 00:48
Copy link
Contributor

@ConnorMcMahon ConnorMcMahon left a comment

Choose a reason for hiding this comment

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

Looks good for the most part, just a few naming suggestions and questions.

@amdeel amdeel added this to the Analyzer 0.2.2 milestone Apr 28, 2020
@amdeel amdeel merged commit 183f3c4 into dev May 6, 2020
@amdeel amdeel deleted the Analyzer221Fixes branch May 6, 2020 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants