Skip to content

Commit 8c11143

Browse files
committed
text/template improved comparison error addresses issue #71421
1 parent 608acff commit 8c11143

File tree

6 files changed

+96
-1
lines changed

6 files changed

+96
-1
lines changed

.idea/go.iml

+4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

+7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/prettier.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

+6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

+72
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/text/template/funcs.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,7 @@ func lt(arg1, arg2 reflect.Value) (bool, error) {
553553
case k1 == uintKind && k2 == intKind:
554554
truth = arg2.Int() >= 0 && arg1.Uint() < uint64(arg2.Int())
555555
default:
556-
return false, errBadComparison
556+
return false, fmt.Errorf("incompatible types for comparison: %v and %v", arg1.Type(), arg2.Type())
557557
}
558558
} else {
559559
switch k1 {

0 commit comments

Comments
 (0)