Skip to content

text/template: integer hex number consisting "e" or "E" letter is parsed as float64 #8622

@gopherbot

Description

@gopherbot

by antage:

What does 'go version' print?
go version go1.3.1 linux/amd64

What steps reproduce the problem?
1. Parse and execute template consisting integer hex number with "e" or
"E" letter (for example: 0xFE, 0xee, 0xBEA9).
2. Get type of the number.

What happened?
Any integer hex number with "e" or "E" letter has type float64.
Any integer hex number without "e" or "E" letter has type int.

What should have happened instead?
All integer hex number should have type int.

Please provide any additional information below.
This example demonstrates the issue: http://play.golang.org/p/O7jQmuWX6d

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions