Browse Source

Ignore conflicts with decls that are not generated (#1925)

* Ignore conflicts with decls that are not generated

* Fix build error in test
pull/1927/head
Jelle 4 months ago committed by GitHub
parent
commit
f58974ad7b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      src/Generator/Passes/RenamePass.cs
  2. 2
      tests/dotnet/Common/Common.Tests.cs

2
src/Generator/Passes/RenamePass.cs

@ -181,6 +181,8 @@ namespace CppSharp.Passes
declarations.AddRange(@class.TemplateParameters); declarations.AddRange(@class.TemplateParameters);
} }
declarations.RemoveAll(d => !d.IsGenerated);
var existing = declarations.Find(d => d != decl && d.Name == newName); var existing = declarations.Find(d => d != decl && d.Name == newName);
if (existing != null) if (existing != null)
return CheckExisting(decl, existing); return CheckExisting(decl, existing);

2
tests/dotnet/Common/Common.Tests.cs

@ -899,7 +899,7 @@ public class CommonTests
using (var nonTrivialDtor = new NonTrivialDtor()) using (var nonTrivialDtor = new NonTrivialDtor())
{ {
} }
Assert.IsTrue(NonTrivialDtor.dtorCalled); Assert.IsTrue(NonTrivialDtor.DtorCalled);
} }
[Test] [Test]

Loading…
Cancel
Save