Skip to content
This repository was archived by the owner on Oct 16, 2020. It is now read-only.

Commit efcc1c0

Browse files
fix InvalidCastException in GeneratePartialClassStub: not every IMethod corresponds to a MethodDeclaration (there are ConstructorDeclaration and DestructorDeclaration, for ex.)
1 parent 871078d commit efcc1c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/AddIns/BackendBindings/CSharpBinding/Project/Src/CSharpLanguageBinding.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static string GeneratePartialClassContextStub(ICodeContext context)
7474
return "";
7575
var builder = new TypeSystemAstBuilder();
7676
MethodDeclaration decl;
77-
if (member is IMethod) {
77+
if (member.SymbolKind == SymbolKind.Method) {
7878
// If it's a method, convert it directly (including parameters + type parameters)
7979
decl = (MethodDeclaration)builder.ConvertEntity(member);
8080
} else {

0 commit comments

Comments
 (0)