xamarin-macios/tools
Rolf Bjarne Kvinge 5fc4fc66af
[registrar] Don't throw NRE when finding methods that almost implement optional protocol members. (#3658)
If a class implements a protocol with optional members, and that class also exports methods whose selectors match an optional member, but the signature doesn't match, we must show a useful warning instead of erroring out due to a NullReferenceException.

Fixes this:

    System.NullReferenceException: Object reference not set to an instance of an object
      at Registrar.StaticRegistrar.GetBlockProxyAttributeMethod (Mono.Cecil.MethodDefinition method, System.Int32 parameter) [0x00001] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:4113
      at Registrar.StaticRegistrar.GetBlockWrapperCreator (Registrar.Registrar+ObjCMethod obj_method, System.Int32 parameter) [0x001e1] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:4101
      at Registrar.StaticRegistrar.Specialize (Registrar.AutoIndentStringBuilder sb, Registrar.Registrar+ObjCMethod method, System.Collections.Generic.List`1[T] exceptions) [0x0216b] in /Users/builder/data/lanes/1381/9de35b83/source/xamarin-macios/tools/common/StaticRegistrar.cs:3683

when building the msbuild/tests/MyWatchKit2IntentsExtension project.
2018-03-05 15:26:16 +01:00
..
apidiff [src/apidiff] Don't hardcode input/output/build directories. (#3435) 2018-02-09 13:07:22 +01:00
common [registrar] Don't throw NRE when finding methods that almost implement optional protocol members. (#3658) 2018-03-05 15:26:16 +01:00
install-source [tests] Use NUnit.Runners v2.6.4 for the install sources tests. (#3645) 2018-03-05 14:54:56 +01:00
linker [static registrar] Optimize creation of delegates for blocks. (#3623) 2018-03-02 14:30:18 +01:00
mmp [MMP] Allow resolving assemblies to the ones passed in command line args (#3575) 2018-03-02 12:59:25 -06:00
mtouch [mtouch] Move native code sharing check for the remove-dynamic-registrar optimization until after checking the linker settings. (#3643) 2018-03-02 18:28:07 +01:00
.gitignore Add scripts to calculate API diffs and generated code diff between the current build and another revision. (#3447) 2018-02-13 07:47:47 +01:00
Makefile Install source code. 2016-04-24 14:47:27 -04:00
compare-commits.sh Add scripts to calculate API diffs and generated code diff between the current build and another revision. (#3447) 2018-02-13 07:47:47 +01:00
diff-to-html Add scripts to calculate API diffs and generated code diff between the current build and another revision. (#3447) 2018-02-13 07:47:47 +01:00