End Google Ads 201810 - BS.net 01 --> So a guy on my team accidentally left out a "return" statement in the following code:

public override OM.ModelObjectMessageSource CreateMessageSource(OM.ModelSolutionBase solution, OM.ModelObject item, OM.ModelObject referencedItem) { ….. TtTransitionPointer oTransitionPointer = item as TtTransitionPointer; if (oTransitionPointer != null) new TransitionPointerMessageSource(oTransitionPointer); ….. return base.CreateMessageSource(solution, item, referencedItem); }
Easily enough found and fixed as it turned out, but we both were left puzzled that this wasn't a compiler warning. What's the use case for constructing the ephemeral object TransitionPointerMessageSource? It's not assigned to anything and isn't returned.
Tom Clement
Serena Software, Inc.
www.serena.com

articles[^]