DBD parser accepts record type declarations
Record types are the only DBD entries for which the parser will not accept redefinitions. This change lets it accept a record type declaration any number of times. However once a record type declaration has been parsed the full record type definition cannot be loaded, an error will be raised if the full definition is seen. The parser will still not accept a full record type definition more than once either, any later copies of the record type must be declarations.
This commit is contained in:
@@ -83,7 +83,9 @@ sub toCdefs {
|
||||
}
|
||||
|
||||
sub equals {
|
||||
my ($a, $b) = @_;
|
||||
my ($new, $known) = @_;
|
||||
return 0 if ! $known->fields;
|
||||
return 1 if ! $new->fields;
|
||||
dieContext("Duplicate definition of record type '$a->{NAME}'");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user