When the return type of a method of a generic class was itself a generic type, this type was not recorded for the returned symbol.
This patch address this issue (see the test for examples).
There is one odd thing: the return type of a method is computed twice. Once in the preObjCMessage callback and once in the postObjCMessage callback. The reason is that, it is better to report the type error in the pre callback, because this way the user gets cleaner diagnostic (shorter path). However it is only possible to record the type information in the post callback, since the symbol for the return type is not available yet in the pre callback.
If you swap this 'if' with the 'if' above, you do not need to check for IsDeclaredAsInstanceType twice.