Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 260 for caught (0.16 sec)

  1. test/fixedbugs/issue11737.go

    // errorcheck
    
    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Issue 11737 - invalid == not being caught until generated switch code was compiled
    
    package p
    
    func f()
    
    func s(x interface{}) {
    	switch x {
    	case f: // ERROR "invalid case f \(type func\(\)\) in switch \(incomparable type\)|can only be compared to nil"
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 04 23:42:25 UTC 2022
    - 437 bytes
    - Viewed (0)
  2. test/method6.go

    // errorcheck
    
    // Copyright 2017 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Verify that pointer method calls are caught during typechecking.
    // Reproducer extracted and adapted from method.go
    
    package foo
    
    type A struct {
    	B
    }
    type B int
    
    func (*B) g() {}
    
    var _ = func() {
    	var a A
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 04 21:22:23 UTC 2020
    - 467 bytes
    - Viewed (0)
  3. guava/src/com/google/common/cache/CacheLoader.java

       *     treated like any other {@code Exception} in all respects except that, when it is caught,
       *     the thread's interrupt status is set
       * @since 11.0
       */
      public Map<K, V> loadAll(Iterable<? extends K> keys) throws Exception {
        // This will be caught by getAll(), causing it to fall back to multiple calls to
        // LoadingCache.get
        throw new UnsupportedLoadingOperationException();
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Mon Dec 19 20:20:14 UTC 2022
    - 9.5K bytes
    - Viewed (0)
  4. test/fixedbugs/issue9521.go

    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Test that an incorrect use of the blank identifier is caught.
    // Does not compile.
    
    package main
    
    func f() (_, _ []int)         { return }
    func g() (x []int, y float64) { return }
    
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Nov 12 23:07:01 UTC 2021
    - 597 bytes
    - Viewed (0)
  5. test/typeswitch2.go

    // errorcheck
    
    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Verify that various erroneous type switches are caught by the compiler.
    // Does not compile.
    
    package main
    
    import "io"
    
    func whatis(x interface{}) string {
    	switch x.(type) {
    	case int:
    		return "int"
    	case int: // ERROR "duplicate"
    		return "int8"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 11 23:33:11 UTC 2019
    - 655 bytes
    - Viewed (0)
  6. test/varerr.go

    // Copyright 2010 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Verify that a couple of illegal variable declarations are caught by the compiler.
    // Does not compile.
    
    package main
    
    func main() {
    	_ = asdf	// ERROR "undefined.*asdf"
    
    	new = 1	// ERROR "use of builtin new not in function call|invalid left hand side|must be called"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 04 21:22:23 UTC 2020
    - 449 bytes
    - Viewed (0)
  7. pilot/pkg/util/network/ip.go

    func AllIPv6(ipAddrs []string) bool {
    	for i := 0; i < len(ipAddrs); i++ {
    		addr, err := netip.ParseAddr(ipAddrs[i])
    		if err != nil {
    			// Should not happen, invalid IP in proxy's IPAddresses slice should have been caught earlier,
    			// skip it to prevent a panic.
    			continue
    		}
    		if addr.Is4() {
    			return false
    		}
    	}
    	return true
    }
    
    // AllIPv4 checks the addresses slice and returns true if all addresses
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Dec 21 21:27:21 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  8. test/method1.go

    // errorcheck
    
    // Copyright 2009 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Verify that method redeclarations are caught by the compiler.
    // Does not compile.
    
    package main
    
    type T struct{}
    
    func (t *T) M(int, string)  // GCCGO_ERROR "previous"
    func (t *T) M(int, float64) {} // ERROR "already declared|redefinition"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 27 21:59:19 UTC 2022
    - 739 bytes
    - Viewed (0)
  9. src/runtime/testdata/testprogcgo/catchpanic.go

    		return;
    	registerAbortHandler();
    }
    */
    import "C"
    import "os"
    
    func init() {
    	register("CgoCatchPanic", CgoCatchPanic)
    }
    
    // Test that the SIGABRT raised by panic can be caught by an early signal handler.
    func CgoCatchPanic() {
    	if _, ok := os.LookupEnv("CGOCATCHPANIC_EARLY_HANDLER"); !ok {
    		C.registerAbortHandler()
    	}
    	panic("catch me")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 993 bytes
    - Viewed (0)
  10. test/typecheckloop.go

    // errorcheck
    
    // Copyright 2015 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Verify that constant definition loops are caught during
    // typechecking and that the errors print correctly.
    
    package main
    
    const A = 1 + B // ERROR "constant definition loop\n.*A uses B\n.*B uses C\n.*C uses A|initialization cycle"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 23 20:27:09 UTC 2022
    - 528 bytes
    - Viewed (0)
Back to top