mirror of
https://github.com/hanzoai/yaegi.git
synced 2026-10-01 00:49:47 +00:00
When parsing binary operator expressions, make sure that implicit type conversions for untyped expressions are performed. It involves walking the sub-expression subtree at post-processing of binary expressions. Fixes #1653.
13 lines
116 B
Go
13 lines
116 B
Go
package main
|
|
|
|
func f(b uint) uint {
|
|
return uint(1) + (0x1 >> b)
|
|
}
|
|
|
|
func main() {
|
|
println(f(1))
|
|
}
|
|
|
|
// Output:
|
|
// 1
|