- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 4,347 for const2 (0.15 sec)
-
test/const3.go
package main import "fmt" type T int func (t T) String() string { return fmt.Sprintf("T%d", int(t)) } const ( A T = 1 << (1 << iota) B C D E ) func main() { s := fmt.Sprintf("%v %v %v %v %v", A, B, C, D, E) if s != "T2 T4 T16 T256 T65536" { println("type info didn't propagate in const: got", s) panic("fail") } x := uint(5) y := float64(uint64(1)<<x) // used to fail to compile
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Feb 19 02:19:43 UTC 2012 - 659 bytes - Viewed (0) -
test/const1.go
f(Bool) // ERROR "convert|wrong type|cannot|incompatible" } const ptr = nil // ERROR "const.*nil|not constant" const _ = string([]byte(nil)) // ERROR "is not a? ?constant" const _ = uintptr(unsafe.Pointer((*int)(nil))) // ERROR "is not a? ?constant" const _ = unsafe.Pointer((*int)(nil)) // ERROR "cannot be nil|invalid constant type|is not a constant|not constant"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Dec 01 21:49:31 UTC 2020 - 3.8K bytes - Viewed (0) -
src/runtime/internal/sys/consts.go
const StackGuardMultiplier = 1 + goos.IsAix + isRace // DefaultPhysPageSize is the default physical page size. const DefaultPhysPageSize = goarch.DefaultPhysPageSize // PCQuantum is the minimal unit for a program counter (1 on x86, 4 on most other systems). // The various PC tables record PC deltas pre-divided by PCQuantum. const PCQuantum = goarch.PCQuantum
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 16:26:25 UTC 2022 - 1.4K bytes - Viewed (0) -
test/const.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 26 23:54:29 UTC 2019 - 4.8K bytes - Viewed (0) -
test/const5.go
package p var b struct { a[10]int } var m map[string][20]int var s [][30]int func f() *[40]int var c chan *[50]int var z complex128 const ( n1 = len(b.a) n2 = len(m[""]) n3 = len(s[10]) n4 = len(f()) // ERROR "is not a constant|is not constant" n5 = len(<-c) // ERROR "is not a constant|is not constant"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Jul 11 14:36:33 UTC 2015 - 835 bytes - Viewed (0) -
test/const6.go
Emmanuel Odeke <******@****.***> 1460323946 -0700
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 02 13:43:18 UTC 2016 - 834 bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewritedec64.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 19 22:42:34 UTC 2023 - 65.3K bytes - Viewed (0) -
test/convT2X.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jul 02 23:09:05 UTC 2012 - 3.3K bytes - Viewed (0) -
test/const7.go
func main() { if runtime.GOOS == "js" || runtime.GOOS == "wasip1" || runtime.Compiler != "gc" { return } dir, err := ioutil.TempDir("", "const7_") if err != nil { log.Fatalf("creating temp dir: %v\n", err) } defer os.RemoveAll(dir) const bitLimit = 512 const charLimit = 10000 // compiler-internal constant length limit testProg(dir, "x1", bitLimit, "") testProg(dir, "x2", bitLimit+1, "constant overflow")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 11 20:56:32 UTC 2023 - 1.9K bytes - Viewed (0) -
src/cmd/compile/internal/types2/const.go
case Int: var s = uint(sizeof(typ)) * 8 return int64(-1)<<(s-1) <= x && x <= int64(1)<<(s-1)-1 case Int8: const s = 8 return -1<<(s-1) <= x && x <= 1<<(s-1)-1 case Int16: const s = 16 return -1<<(s-1) <= x && x <= 1<<(s-1)-1 case Int32: const s = 32 return -1<<(s-1) <= x && x <= 1<<(s-1)-1 case Int64, UntypedInt: return true case Uint, Uintptr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 22 19:32:17 UTC 2024 - 7.5K bytes - Viewed (0)