-
Notifications
You must be signed in to change notification settings - Fork 383
Closed
dotnet/sdk
#30001Labels
area-product-constructionIssues owned by the Product Construction team. Used to label epics and untriaged, loose issues.Issues owned by the Product Construction team. Used to label epics and untriaged, loose issues.
Description
The SyntaxGenerator.Declaration(ISymbol symbol) does not handles SymbolKind.Method with MethodKind.Conversion as a result the exception ArgumentException("Symbol cannot be converted to a declaration") is thrown.
var method = (IMethodSymbol)symbol;
+if (method.MethodKind == MethodKind.Conversion)
+{
+ return ConversionMethodDeclaration(method, method.Name);
+}
//...
+ private static SyntaxNode ConversionMethodDeclaration(IMethodSymbol method, string name) {}Examples:
public readonly partial struct Memory<T>
{
public static implicit operator System.Memory<T> (T[] array) { throw null; }
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-product-constructionIssues owned by the Product Construction team. Used to label epics and untriaged, loose issues.Issues owned by the Product Construction team. Used to label epics and untriaged, loose issues.