diff --git a/compiler2/Constraint.cc b/compiler2/Constraint.cc
index 51ba209c51fef0bb3cf0fab38c127e1418bfd689..c45fd4510ba5606502ba13826c755a26347e48eb 100644
--- a/compiler2/Constraint.cc
+++ b/compiler2/Constraint.cc
@@ -1146,6 +1146,7 @@ namespace Common {
       delete node;
       return; // parsing error was already reported
     }
+    constraint->set_fullname(get_fullname());
     constraint->set_my_type(my_type);
     constraint->set_my_scope(get_my_scope());
     constraint->set_my_parent(this);