fix: allow imported binary variables to be set (#85)

Change the way imported binary variables are imported, from
`reflect.ValueOf(val)` to `reflect.ValueOf(&val).Elem()`, to allow these
variables to be set from the interpreter.
Regenerate stdlib packages accordingly.
Ensure that binary value is forwarded if it exists.
Add tests.
This commit is contained in:
Marc Vertes
2019-02-07 15:41:22 +01:00
committed by Ludovic Fernandez
parent a99fb98f84
commit 6d21cefe75
93 changed files with 765 additions and 661 deletions

18
_test/assign0.go Normal file
View File

@@ -0,0 +1,18 @@
package main
import (
"fmt"
"net/http"
"time"
)
func main() {
http.DefaultClient.Timeout = time.Second * 10
fmt.Println(http.DefaultClient)
http.DefaultClient = &http.Client{}
fmt.Println(http.DefaultClient)
}
// Output:
// &{<nil> <nil> <nil> 10s}
// &{<nil> <nil> <nil> 0s}