Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(317)

Issue 149780043: code review 149780043: text/template: allow comparison functions to work betwe... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
6 years, 4 months ago by r
Modified:
6 years, 3 months ago
Reviewers:
adg
CC:
golang-codereviews, adg
Visibility:
Public.

Description

text/template: allow comparison functions to work between any integers Previously, signed and unsigned integers could not be compared, but this has problems with things like comparing 'x' with a byte in a string. Since signed and unsigned integers have a well-defined ordering, even though their types are different, and since we already allow comparison regardless of the size of the integers, why not allow it regardless of the sign? Integers only, a fine place to draw the line. Fixes issue 7489.

Patch Set 1 #

Patch Set 2 : diff -r 50ce4ec65c4acfa2ca72e62ea283e1d730f2d6f3 https://code.google.com/p/go/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -56 lines) Patch
M src/text/template/doc.go View 1 chunk +5 lines, -4 lines 0 comments Download
M src/text/template/exec_test.go View 6 chunks +48 lines, -18 lines 0 comments Download
M src/text/template/funcs.go View 2 chunks +52 lines, -34 lines 0 comments Download

Messages

Total messages: 3
r
Hello golang-codereviews@googlegroups.com, I'd like you to review this change to https://code.google.com/p/go/
6 years, 4 months ago (2014-09-19 21:14:34 UTC) #1
adg
LGTM
6 years, 3 months ago (2014-09-21 22:51:11 UTC) #2
r
6 years, 3 months ago (2014-09-22 18:46:06 UTC) #3
*** Submitted as https://code.google.com/p/go/source/detail?r=962a07a85263 ***

text/template: allow comparison functions to work between any integers
Previously, signed and unsigned integers could not be compared, but
this has problems with things like comparing 'x' with a byte in a string.
Since signed and unsigned integers have a well-defined ordering,
even though their types are different, and since we already allow
comparison regardless of the size of the integers, why not allow it
regardless of the sign?

Integers only, a fine place to draw the line.

Fixes issue 7489.

LGTM=adg
R=golang-codereviews, adg
CC=golang-codereviews
https://codereview.appspot.com/149780043
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b