# HG changeset patch # User Paul Boddie # Date 1339259337 -7200 # Node ID 4ef0e1e1b21304090af1133bfb491af4b26896af # Parent 46d9438f5a384204c943fdbd318f12e7551ded62 Made type deduction strict, requiring all attributes from a usage specification. diff -r 46d9438f5a38 -r 4ef0e1e1b213 micropython/data.py --- a/micropython/data.py Sat Jun 09 18:28:02 2012 +0200 +++ b/micropython/data.py Sat Jun 09 18:28:57 2012 +0200 @@ -477,10 +477,9 @@ for name, combined_usage in usage.items(): if combined_usage is not None: objtypes = get_object_types_for_usage(combined_usage, objtable, name, self.full_name(), True) - if not objtypes: - objtypes = get_object_types_for_usage(combined_usage, objtable, name, self.full_name(), False) - if isinstance(self, Function) and self.is_method() and name == "self": - objtypes = filter_using_self(objtypes, self.parent) + if objtypes: + if isinstance(self, Function) and self.is_method() and name == "self": + objtypes = filter_using_self(objtypes, self.parent) attrtypes[name] = objtypes return attrtypes