Browse Source

[cs] don't try to convert Finalize methods as those are destructors apparently (see #5241)

Dan Korostelev 8 years ago
parent
commit
e4774776c7
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/codegen/dotnet.ml

+ 1 - 0
src/codegen/dotnet.ml

@@ -381,6 +381,7 @@ let convert_ilmethod ctx p m is_explicit_impl =
 	let cff_name = match m.mname with
 	let cff_name = match m.mname with
 		| ".ctor" -> "new"
 		| ".ctor" -> "new"
 		| ".cctor"-> raise Exit (* __init__ field *)
 		| ".cctor"-> raise Exit (* __init__ field *)
+		| "Finalize" -> raise Exit (* destructor (~ClassName) *)
 		| "Equals" | "GetHashCode" -> raise Exit
 		| "Equals" | "GetHashCode" -> raise Exit
 		| name when String.length name > 5 ->
 		| name when String.length name > 5 ->
 				(match String.sub name 0 5 with
 				(match String.sub name 0 5 with