fix: register mismatch when no brace capture
continuous-integration/drone/push Build is passing Details
continuous-integration/drone/tag Build is passing Details

This commit is contained in:
Adrien Marquès 2020-03-21 15:58:05 +01:00
parent 5fe983c486
commit a15a5c1f7a
Signed by: xdrm-brackets
GPG Key ID: D75243CA236D825E
1 changed files with 2 additions and 2 deletions

View File

@ -93,8 +93,8 @@ func (server *Server) collide() error {
if !aIsCapture && !bIsCapture {
if aPart == bPart {
partErrors = append(partErrors, fmt.Errorf("(%s '%s') vs (%s '%s'): %w (same path '%s')", aService.Method, aService.Pattern, bService.Method, bService.Pattern, ErrPatternCollision, aPart))
continue
}
continue
}
// A captures B -> check type (B is A ?)
@ -114,7 +114,7 @@ func (server *Server) collide() error {
}
// B captures A -> check type (A is B ?)
} else {
} else if bIsCapture {
input, exists := bService.Input[bPart]
// fail if no type or no validator