Add polymorphic function generation test case