func (loc SourceLocation) Validate() error {
	if loc == zero {
		return nil
	}

	// Module may be anything, so there's nothing to check there.

	// Filename may be set with no line number set, but not the other
	// way around.
	if loc.Line >= 0 && loc.Filename == "" {
		return errors.NewNotValid(nil, "Line set but Filename empty")
	}

	return nil
}
// Validate ensures that the location is correct.
Validate ensures that the location is correct.
// Validate ensures that the location is correct .
func (loc SourceLocation) Validate() error {
	if loc == zero {
		return nil
	}
	if loc.Line >= 0 && loc.Filename == "" {
		return errors.NewNotValid(nil, "Line set but Filename empty")
	}
	return nil
}
func ( loc SourceLocation ) Validate ( ) error { if loc == zero { return nil } if loc . Line >= 0 && loc . Filename == " " { return errors . NewNotValid ( nil , " " ) } return nil }
Validate ensures that the location is correct.
Validate ensures that the location is correct .
// Module may be anything, so there's nothing to check there. // Filename may be set with no line number set, but not the other // way around.