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

Expand the ShimLayer with ITypeSymbol.NullableAnnotation #6825

Closed
Tim-Pohlmann opened this issue Feb 28, 2023 · 3 comments · Fixed by #6952
Closed

Expand the ShimLayer with ITypeSymbol.NullableAnnotation #6825

Tim-Pohlmann opened this issue Feb 28, 2023 · 3 comments · Fixed by #6952
Assignees
Labels
Area: C# C# rules related issues. Sprint: SE Short-lived* label for epic MMF-3077 *troll Type: New Feature This hasn't been here before.
Projects
Milestone

Comments

@Tim-Pohlmann
Copy link
Contributor

ITypeSymbol.NullableAnnotation is currently not part of the ShimLayer. Adding it, will make checking for Nullables easier and more robust.
See also:
#3273 (comment)
#6753 (comment)

@martin-strecker-sonarsource
Copy link
Contributor

Something like in TypeInfoExtensions needs to be created:

public static class ITypeSymbolExtensions
{
    public NullableAnnotation NullableAnnotation(this ITypeSymbol symbol) { }
}

It is a bit easier as TypeInfoExtensions.Nullability(this TypeInfo typeInfo) but still needs the enum to enum conversion. Maybe one of the LightupHelpers.CreateSyntaxPropertyAccessor already does what we need (there is an overload that takes a type and calls Convert).

@Corniel
Copy link
Contributor

Corniel commented Mar 24, 2023

@Tim-Pohlmann I think we've solved this with #6952 . :)

@Tim-Pohlmann
Copy link
Contributor Author

That's great news. Thank you!

@martin-strecker-sonarsource martin-strecker-sonarsource moved this from To do to Review approved in Best Kanban Mar 27, 2023
Best Kanban automation moved this from Review approved to Validate Peach Mar 28, 2023
@martin-strecker-sonarsource martin-strecker-sonarsource moved this from Validate Peach to Done in Best Kanban Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: C# C# rules related issues. Sprint: SE Short-lived* label for epic MMF-3077 *troll Type: New Feature This hasn't been here before.
Projects
Best Kanban
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants