The linker got smarter with https://github.com/mono/linker/pull/394
so we now remove B.Bar() since it's not used.
This commit is contained in:
Alexander Köplinger 2019-03-14 13:43:09 +01:00
Родитель 13c2ef3768
Коммит 6e3b0f2298
1 изменённых файлов: 2 добавлений и 3 удалений

Просмотреть файл

@ -90,10 +90,9 @@ namespace LinkAll.Interfaces {
// I::Bar is used in F so everyone implementing I needs Bar // I::Bar is used in F so everyone implementing I needs Bar
Assert.NotNull (type_i.GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "I::Bar"); Assert.NotNull (type_i.GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "I::Bar");
// Foo and Bar are never used on B - so Foo can be removed // Foo and Bar are never used on B - so they can be removed
Assert.Null (type_b.GetMethod ("Foo", BindingFlags.Instance | BindingFlags.Public), "B::Foo"); Assert.Null (type_b.GetMethod ("Foo", BindingFlags.Instance | BindingFlags.Public), "B::Foo");
// but Bar cannot since B implements I Assert.Null (type_b.GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "B::Bar");
Assert.NotNull (type_b.GetMethod ("Bar", BindingFlags.Instance | BindingFlags.Public), "B::Bar");
} }
[DllImport ("/usr/lib/system/libsystem_dnssd.dylib")] [DllImport ("/usr/lib/system/libsystem_dnssd.dylib")]