Problem with enums and generic methods

About Monkey 2 Forums Monkey 2 Development Problem with enums and generic methods

This topic contains 1 reply, has 1 voice, and was last updated by  Arjailer 2 years, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #1887


    I’m having a problem passing enums into a generic method.

    The method is:


    I can call this successfully with a single enum:

    IsSame(Direction.None, Direction.None)

    but if I try to add a second call with a different enum:

    IsSame(AnotherEnum.Value, AnotherEnum.Value)

    then it complains that the method has been “previously defined“.

    Unfortunately I can’t paste the entire error here as the Ted2 output window doesn’t let me select or copy text, but it’s basically:

    redefinition of ‘void g_framework_testing_TestAssert_IsSame_1TbbInt_2(bbInt, bbInt, bbString)’

    ‘void g_framework_testing_TestAssert_IsSame_1TbbInt_2(bbInt, bbInt, bbString)’ previously defined here void g_framework_testing_TestAssert_IsSame_1TbbInt_2(bbInt l_expected, bbInt l_actual, bbString l_message){



    Note that I can work around this, but I’m guessing it’s not intentional and should be fixed?

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.