Incorrect parsing of integer constants like `2e1`
Opened this issue · 1 comments
lmbarros commented
Context
Originally mentioned in #4481 (comment) , moving to a separate issue.
Failure Information (for bugs)
Steps to Reproduce
This program
main :: proc() {
i: int = 2e1
j: int = 2.2e1
fmt.printfln("%v, %v", i, j)
}
gives me this result:
10, 22
I'd expect 2e1
to be 20
.
dislux-hapfyl commented
package test
import "core:fmt"
main :: proc() {
x: int = 2.e1
y: int = 2.2e1
fmt.printfln("%v, %v", x, y)
}
20,22
You forgot the period.