Maybe something wrong with Generics?

About Monkey 2 Forums Monkey 2 Development Maybe something wrong with Generics?

This topic contains 4 replies, has 2 voices, and was last updated by  Jesse 2 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2108

    Jesse
    Participant

    the Code below was working with the previous version of Mx2 but now it doesn’t recognize the generic class new.  As I am no expert I don’t know if it’s my code or a bug with generics. by the way tha’s Mark’s Deque module:

     

    #2112

    Mark Sibly
    Keymaster

    What error do you get?

    How do I reproduce the error?

    Also, there’s a version of Deque coming to std soon..

    #2113

    Jesse
    Participant

    Sorry Mark it tells me method super.new() in the extended type is undeclared:

    /Users/ayoitseve/Desktop/monkeypatrol/src/deque.monkey2 [209] : Error : Can’t find overload for ‘new(…)’ with argument types (string[])
    /Users/ayoitseve/Desktop/monkeypatrol/src/deque.monkey2 [198] : Error : Can’t find overload for ‘new(…)’ with argument types (float[])
    /Users/ayoitseve/Desktop/monkeypatrol/src/deque.monkey2 [187] : Error : Can’t find overload for ‘new(…)’ with argument types (int[])

    #2114

    Jesse
    Participant

    I am trying to isolate the code to post it but everything seems to work good. I can’t duplicate the error with the code I wrote. It’s working fine. I can’t understand is why the error now and why in those files because I am not using Int, Float or string Deque and it shouldn’t be a reason to point out those errors.

    #2115

    Jesse
    Participant

    well, I deleted the int, float and string classes and I was able to keep using the module. But I still don’t know why the error. as all I did was just remove those three classes and it worked. no other code edit on any of the other files.

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

You must be logged in to reply to this topic.