Bugs item #2062062, was opened at 2008-08-20 12:30 Message generated for change (Comment added) made by mlkersten You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2062062&group_id=56967
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Core Group: MonetDB5 CVS Head Status: Closed Resolution: Rejected Priority: 5 Private: No Submitted By: Fabian (mr-meltdown) Assigned to: Martin Kersten (mlkersten) Summary: M5: resolution doesn't pick most specific overloaded func Initial Comment: take this example: function myfunc(o:bat[:any_1,:any_2]); len := aggr.count(o); io.print(len); end myfunc; function myfunc(o:any); io.print(o); end myfunc; b := bat.new(:str, :int); myfunc(b); result: #-----------------# # h t # name # str int # type #-----------------# expected: [ 0 ] If this is not allowed, then either kill overloading, or make the parser reject these kinds of overloadings. The ability to overload suggests that overloading also properly works by taking the most specific match. :bat[:any_1,:any_2] is IMHO more specific than :any. ---------------------------------------------------------------------- >Comment By: Martin Kersten (mlkersten) Date: 2008-08-20 21:22 Message: Logged In: YES user_id=490798 Originator: NO There is no such MAL type resolution rule intended in the language. Such a rule can not be defined when more then one argument exists. The function signatures are pre-pended to the symbol table and matched accordingly. As such, the last function is called her. ---------------------------------------------------------------------- Comment By: Fabian (mr-meltdown) Date: 2008-08-20 21:20 Message: Logged In: YES user_id=963970 Originator: YES That is somehow disturbing. I'd rather disallow any signatures where the argument list has the same length, and joker types are used, to force a correct order. ---------------------------------------------------------------------- Comment By: Martin Kersten (mlkersten) Date: 2008-08-20 21:09 Message: Logged In: YES user_id=490798 Originator: NO There is no such MAL type resolution rule intended in the language. Such a rule can not be defined when more then one argument exists. The function signatures are pre-pended to the symbol table and matched accordingly. As such, the last function is called her. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2062062&group_id=56967 ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Monetdb-bugs mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/monetdb-bugs
