# HG changeset patch
# User Sylvain Thénault <sylvain.thenault@logilab.fr>
# Date 1249469929 -7200
#      Wed Aug 05 12:58:49 2009 +0200
# Node ID 52e124acc1edf51735c720579acad27d52b6354d
# Parent  ba227f0acace54c5200775a2566e135020e9cca9
add test for ticket #9042

diff --git a/test/unittest_analyze.py b/test/unittest_analyze.py
--- a/test/unittest_analyze.py
+++ b/test/unittest_analyze.py
@@ -241,6 +241,17 @@
         sols = sorted(node.children[0].solutions)
         self.assertEqual(sols, [{'X': 'Company'}, {'X': 'Person'}, {'X': 'Student'}])
 
+    def test_non_regr_no_final_type(self):
+        """https://www.logilab.net/elo/ticket/9042"""
+        node = self.helper.parse('Any X WHERE X creation_date > ((2009 - 4) - 16)')
+        self.helper.compute_solutions(node, debug=DEBUG)
+        sols = sorted(node.children[0].solutions)
+        self.assertEqual(sols, [{'X': 'Address'},
+                                {'X': 'Company'},
+                                {'X': 'Eetype'},
+                                {'X': 'Person'},
+                                {'X': 'Student'}])
+
     def test_is_instance_of_1(self):
         node = self.helper.parse('Any X WHERE X is_instance_of Person')
         # check constant type of the is relation inserted