You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to use the same strategy as the C# implementation: adding the Simplifier.Annotation annotation to the top-level syntax tree which was generated and inserted as part of the refactoring. However, even with this annotation the inserted code contains a reference to System.ArgumentNullException instead of just ArgumentNullException.
This seems to be an issue related to the weirdness of how we treat Simplify/DontSimplify annotations in our simplification engine.
The underlying issue isn't difficult to fix. However, the fix causes other tests to fail, seems like other rewriters were relying on the wrong behavior of us not respecting simplify/don't simplify annotations on statement nodes. We should address this bug as part of the bigger work item to rationalize simplify annotations.
_Simplifier annotations added explicitly to statement nodes are not working in VB. This is due to special handling of statement simplification in VB. Even though we can speculate on individual statements, simplification for statements is dependent on prior and subsequent statements. Hence we execute the simplification rewriters on the entire method block enclosing the statements. However, we did not set the alwaysSimplify flag if the node has a simplifier annotation. So, if any descendant expression node has a simplifier annotation, we simplify it, but if the whole statement had the simplifier annotation, but none of it descendants were annotation, we don't simplify the entire statement. The issue wasn't previously caught as our simplification analyzer always annotates individual expressions to simplify.
The text was updated successfully, but these errors were encountered:
shyamnamboodiripad
changed the title
[CodePlex] Simplifier annotation not working in Visual Basic
Simplifier annotation not working in Visual Basic
Feb 13, 2015
Moving this out to the unknown milestone. The work involved to fix the simplifier for this issue is significant and it is unlikely that we can bite this off for v1.0. We have a story on the backlog for addressing this. I will add a link to that story here once I port that story to GitHub.
Ported from TFS WorkItem: 1084695 and http://roslyn.codeplex.com/workitem/399
**sharwell* reported:
I am attempting to resolve the following issue:
DotNetAnalyzers/NullParameterCheckRefactoring#18
I attempted to use the same strategy as the C# implementation: adding the
Simplifier.Annotation
annotation to the top-level syntax tree which was generated and inserted as part of the refactoring. However, even with this annotation the inserted code contains a reference toSystem.ArgumentNullException
instead of justArgumentNullException
.Here is a link to the commit I *expected to resolve this issue in my code:
sharwell/NullParameterCheckRefactoring@cac7241
**Manish Vasani* commented:*
This seems to be an issue related to the weirdness of how we treat Simplify/DontSimplify annotations in our simplification engine.
The underlying issue isn't difficult to fix. However, the fix causes other tests to fail, seems like other rewriters were relying on the wrong behavior of us not respecting simplify/don't simplify annotations on statement nodes. We should address this bug as part of the bigger work item to rationalize simplify annotations.
_Simplifier annotations added explicitly to statement nodes are not working in VB. This is due to special handling of statement simplification in VB. Even though we can speculate on individual statements, simplification for statements is dependent on prior and subsequent statements. Hence we execute the simplification rewriters on the entire method block enclosing the statements. However, we did not set the alwaysSimplify flag if the node has a simplifier annotation. So, if any descendant expression node has a simplifier annotation, we simplify it, but if the whole statement had the simplifier annotation, but none of it descendants were annotation, we don't simplify the entire statement.
The issue wasn't previously caught as our simplification analyzer always annotates individual expressions to simplify.
The text was updated successfully, but these errors were encountered: