Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: inlining signed shift from Go 1.13 package into Go 1.12 package causes compilation error #35442

Closed
mdempsky opened this issue Nov 7, 2019 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mdempsky
Copy link
Member

mdempsky commented Nov 7, 2019

This should probably compile:

$ cat a.go
package a

func F(x, y int) int { return x << y }

$ cat b.go
package b

import "./a"

func f() { a.F(0, 0) }

$ go tool compile -lang=go1.13 a.go
$ go tool compile -lang=go1.12 b.go
/tmp/a.go:3:33: invalid operation: a.x << a.y (signed shift count type int) requires go1.13 or later (-lang was set to go1.12; check go.mod)

Related: #35437

/cc @bcmills @griesemer

@mdempsky mdempsky added the NeedsFix The path to resolution is known, but the work has not been done. label Nov 7, 2019
@griesemer
Copy link
Contributor

Agreed.

@griesemer griesemer added this to the Go1.14 milestone Nov 7, 2019
@griesemer
Copy link
Contributor

Not a regression, but would be nice to get fixed.

@gopherbot
Copy link

Change https://golang.org/cl/205977 mentions this issue: cmd/compile: don't apply -lang=go1.X restrictions to imported packages

@golang golang locked and limited conversation to collaborators Nov 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants