+ for alias, target in aliases:
+ assert alias not in result, "Alias %s overrides an existing field" % alias
+ assert target in result, "Missing target %s for alias %s" % (target, alias)
+ (fdef, k, fn) = result[target]
+ fdef = fdef.Copy()
+ fdef.name = alias
+ result[alias] = (fdef, k, fn)
+
+ assert len(result) == len(fields) + len(aliases)