1.1 --- a/deducer.py Thu Jul 05 16:00:24 2018 +0200
1.2 +++ b/deducer.py Thu Jul 05 16:01:33 2018 +0200
1.3 @@ -2136,6 +2136,17 @@
1.4 if constrained:
1.5 self.accessor_constrained.add(location)
1.6
1.7 + # Complain about situations where no types are valid but where a
1.8 + # specific, known accessor type has been indicated. This absence of
1.9 + # suitable types is likely to occur when the presence of invocations
1.10 + # filters out the accessor type.
1.11 +
1.12 + if not class_only_types and not instance_types and not module_types and \
1.13 + invocations and constrained_specific:
1.14 +
1.15 + raise DeduceError("In %s, methods of class %s cannot be called directly." %
1.16 + (path, name))
1.17 +
1.18 def update_provider_types(self, location, class_types, instance_types, module_types):
1.19
1.20 """