1.1 --- a/deducer.py Sun Jan 22 01:09:26 2017 +0100
1.2 +++ b/deducer.py Sun Jan 22 01:12:21 2017 +0100
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Deduce types for usage observations.
1.6
1.7 -Copyright (C) 2014, 2015, 2016 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2014, 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -1991,7 +1991,14 @@
1.13
1.14 # First attribute accessed at a known position via the accessor.
1.15
1.16 - if base or dynamic_base:
1.17 + # Static bases support object-relative accesses only.
1.18 +
1.19 + if base:
1.20 + first_method = "relative-object"
1.21 +
1.22 + # Dynamic bases support either object- or class-relative accesses.
1.23 +
1.24 + elif dynamic_base:
1.25 first_method = "relative" + (object_relative and "-object" or "") + \
1.26 (class_relative and "-class" or "")
1.27