Object member values must be unique
This commit is contained in:
parent
098acafab1
commit
85bc6064f2
@ -285,6 +285,16 @@ func (analyzer *analysisOperation) analyzeObjectMembers (
|
||||
}
|
||||
}
|
||||
|
||||
// ensure all member names are unique
|
||||
for _, compareMember := range into.members {
|
||||
if compareMember.name == outputMember.name {
|
||||
err = inputMember.NewError (
|
||||
"object member names must be unique",
|
||||
infoerr.ErrorKindError)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
into.members = append (
|
||||
into.members,
|
||||
outputMember)
|
||||
|
Reference in New Issue
Block a user