Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 786 for overflows (0.17 sec)

  1. src/internal/types/testdata/check/const1.go

    	_ = int8(minInt8)
    	_ = int8(maxInt8)
    	_ = int8(maxInt8 /* ERROR "overflows" */ + 1)
    	_ = int8(smallestFloat64 /* ERROR "cannot convert" */)
    )
    
    const (
    	_ int16 = minInt16 /* ERROR "overflows" */ - 1
    	_ int16 = minInt16
    	_ int16 = maxInt16
    	_ int16 = maxInt16 /* ERROR "overflows" */ + 1
    	_ int16 = smallestFloat64 /* ERROR "truncated" */
    
    	_ = int16(minInt16 /* ERROR "overflows" */ - 1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 16:11:16 UTC 2023
    - 8.5K bytes
    - Viewed (0)
  2. test/fixedbugs/issue11326.go

    	var _ = 1e64645      // ERROR "1e\+64645 overflows float64|floating-point constant overflow|exponent too large|overflows float64|overflows"
    	var _ = 1e6464       // ERROR "1e\+6464 overflows float64|floating-point constant overflow|overflows float64|overflows"
    	var _ = 1e646        // ERROR "1e\+646 overflows float64|floating-point constant overflow|overflows float64|overflows"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 23 05:11:09 UTC 2021
    - 1.8K bytes
    - Viewed (0)
  3. test/fixedbugs/issue11590.go

    // license that can be found in the LICENSE file.
    
    package p
    
    var _ = int8(4) * 300         // ERROR "overflows int8"
    var _ = complex64(1) * 1e200  // ERROR "complex real part overflow|overflows complex64"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 11 02:26:58 UTC 2022
    - 419 bytes
    - Viewed (0)
  4. src/internal/types/testdata/fixedbugs/issue63563.go

    package p
    
    var (
    	_ = int8(1 /* ERROR "constant 255 overflows int8" */ <<8 - 1)
    	_ = int16(1 /* ERROR "constant 65535 overflows int16" */ <<16 - 1)
    	_ = int32(1 /* ERROR "constant 4294967295 overflows int32" */ <<32 - 1)
    	_ = int64(1 /* ERROR "constant 18446744073709551615 overflows int64" */ <<64 - 1)
    
    	_ = uint8(1 /* ERROR "constant 256 overflows uint8" */ << 8)
    	_ = uint16(1 /* ERROR "constant 65536 overflows uint16" */ << 16)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 16:11:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  5. test/fixedbugs/issue19947.go

    // No double error on ideal -> float{32,64} conversion overflow
    
    package issue19947
    
    var _ = float32(1) * 1e200 // ERROR "constant 1e\+200 overflows float32|1e200 .* overflows float32"
    var _ = float64(1) * 1e500 // ERROR "constant 1e\+500 overflows float64|1e500 .* overflows float64"
    
    var _ = complex64(1) * 1e200  // ERROR "constant 1e\+200 overflows complex64|1e200 .* overflows complex64"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Dec 09 23:59:57 UTC 2020
    - 677 bytes
    - Viewed (0)
  6. src/internal/types/testdata/spec/range_int.go

    	}
    	for range maxUint /* ERROR "cannot use maxUint (untyped int constant 18446744073709551615) as int value in range clause (overflows)" */ {
    	}
    
    	for i := range maxInt {
    		_ = i
    	}
    	for i := range maxInt /* ERROR "cannot use maxInt + 1 (untyped int constant 9223372036854775808) as int value in range clause (overflows)" */ + 1 {
    		_ = i
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:56:00 UTC 2024
    - 4.7K bytes
    - Viewed (0)
  7. test/float_lit3.go

    	float32(max32 + ulp32/2),                 // ERROR "constant 3\.40282e\+38 overflows float32|cannot convert.*to type float32"
    
    	float32(-max32 - ulp32/2 + 1),             // ok
    	float32(-max32 - ulp32/2 + two128/two256), // ok
    	float32(-max32 - ulp32/2),                 // ERROR "constant -3\.40282e\+38 overflows float32|cannot convert.*to type float32"
    
    	// If the compiler's internal floating point representation
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 03 16:24:32 UTC 2021
    - 1.7K bytes
    - Viewed (0)
  8. src/internal/types/testdata/check/constdecl.go

    	_ byte = 255 + iota
    	/* some gap */
    	_ // ERROR "overflows"
    	/* some gap */
    	/* some gap */ _ /* ERROR "overflows" */; _ /* ERROR "overflows" */
    	/* some gap */
    	_ = 255 + iota
    	_ = byte /* ERROR "overflows" */ (255) + iota
    	_ /* ERROR "overflows" */
    )
    
    // Test cases from issue.
    const (
    	ok = byte(iota + 253)
    	bad
    	barn
    	bard // ERROR "overflows"
    )
    
    const (
    	c = len([1 - iota]int{})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 16:11:16 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  9. src/internal/types/testdata/check/decls1.go

    	v2 = c + 255
    	v3 = c + 256 /* ERROR "overflows" */
    	v4 = r + 2147483647
    	v5 = r + 2147483648 /* ERROR "overflows" */
    	v6 = 42
    	v7 = v6 + 9223372036854775807
    	v8 = v6 + 9223372036854775808 /* ERROR "overflows" */
    	v9 = i + 1 << 10
    	v10 byte = 1024 /* ERROR "overflows" */
    	v11 = xx/yy*yy - xx
    	v12 = true && false
    	v13 = nil /* ERROR "use of untyped nil" */
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 05 18:13:11 UTC 2024
    - 3.8K bytes
    - Viewed (0)
  10. src/internal/types/testdata/check/shifts.go

    	var a []byte
    	_ = a[0xffffffffffffffff /* ERROR "overflows int" */ <<s] // example from issue 22969
    	_ = make([]int, 0xffffffffffffffff /* ERROR "overflows int" */ << s)
    	_ = make([]int, 0, 0xffffffffffffffff /* ERROR "overflows int" */ << s)
    	var _ byte = 0x100 /* ERROR "overflows byte" */ << s
    	var _ int8 = 0xff /* ERROR "overflows int8" */ << s
    	var _ int16 = 0xffff /* ERROR "overflows int16" */ << s
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 17 19:54:27 UTC 2023
    - 12.7K bytes
    - Viewed (0)
Back to top