|
|
@@ -112,14 +112,16 @@ operator = (const InterrogateType ©) {
|
|
|
|
|
|
/**
|
|
|
* Combines type with the other similar definition. If one type is "fully
|
|
|
- * defined" and the other one isn't, the fully-defined type wins.
|
|
|
+ * defined" and the other one isn't, the fully-defined type wins. If both
|
|
|
+ * types are fully defined, whichever type is marked "global" wins.
|
|
|
*/
|
|
|
void InterrogateType::
|
|
|
merge_with(const InterrogateType &other) {
|
|
|
// The only thing we care about copying from the non-fully-defined type
|
|
|
// right now is the global flag.
|
|
|
|
|
|
- if (is_fully_defined()) {
|
|
|
+ if (is_fully_defined() &&
|
|
|
+ (!other.is_fully_defined() || (other._flags & F_global) == 0)) {
|
|
|
// We win.
|
|
|
_flags |= (other._flags & F_global);
|
|
|
|