Details
-
Type:
Improvement
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 0.7
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
When the -ducky option is set, treat any subclass of IQuackFu as a duck type implicitly.
Perhaps by adding a castexpression ("as duck") to typeinvocations or using some other strategy in the ProcessMethodBodiesWithDuckTyping step.
Not a priority for me now (maybe for others), but once we have this and slicing duck types (BOO-192), boo can handle the full range from completely static to completely dynamic programming.
A start: In ProcessMethodBodiesWithDuckTyping step, add field:
protected IType quackfu;
In constructor:
quackfu = TypeSystemServices.Map(typeof(Boo.Lang.IQuackFu));
add method:
bool IsIQuackFu(IType type)
{
return quackfu.IsAssignableFrom(type);
}