1.1 --- a/deducer.py Fri Jun 22 15:18:04 2018 +0200
1.2 +++ b/deducer.py Fri Jun 22 17:13:29 2018 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Deduce types for usage observations.
1.6
1.7 -Copyright (C) 2014, 2015, 2016, 2017 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2014, 2015, 2016, 2017, 2018 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 @@ -2713,11 +2713,15 @@
1.13 accessor = (stored_accessor,)
1.14 else:
1.15 accessor = (original_accessor,)
1.16 + else:
1.17 + accessor = None
1.18
1.19 # Apply any test.
1.20
1.21 if test[0] == "test":
1.22 - accessor = ("__%s_%s_%s" % test, accessor, test_type)
1.23 + test_accessor = accessor = ("__to_error", ("__%s_%s_%s" % test, accessor, test_type))
1.24 + else:
1.25 + test_accessor = None
1.26
1.27 # Perform the first or final access.
1.28 # The access only needs performing if the resulting accessor is used.