Bug 825263

Summary: YaST function type matching misconsiders the argument types
Product: [openSUSE] openSUSE Tumbleweed Reporter: Martin Vidner <mvidner>
Component: YaST2Assignee: Josef Reidinger <jreidinger>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: 13.1 Milestone 1   
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Martin Vidner 2013-06-17 06:37:25 UTC
From a proposed changelog to the fix (https://github.com/yast/yast-core/commit/7fb894662dba29389bc553ee3ffdbac9b688826d )

 Fixed function type matching to be contravariant for arguments 
 (return type has always been covariant, correctly).
 Interface expected to handle "any" argument will no longer accept
 implementations handling only a specific subtype. Conversely,
 interfaces expected to handle a "string" will also accept
 an implementation handling "any".
 Affects the "is" builtin; breaks *-bindings relying on the bug!

TODO: fill in the actual symptoms and occurrences of the bug.
Comment 1 Josef Reidinger 2013-06-18 00:31:52 UTC
Fix doesn't show before because it is quite specific and in YCP code it is only in 'is' builtin, where matching functions parameters is not used ( usually only return type ).

This bug appear mainly in ycp-ui-bindings which have feature for dynamic languages, that allows runtime match of overloaded function. Due to bug in core type matching, ycp-ui-bindigns have switched who match to what. This feature is only used by dynamic languages like perl or ruby and it is not widely used, so it doesn't appear before.

It can be indicated by "No matching function" entry in y2log.
Comment 2 Josef Reidinger 2013-07-04 07:08:38 UTC
fix is in YaST:Head