- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 3,753 for switch2 (0.39 sec)
-
test/switch2.go
// Verify that erroneous switch statements are detected by the compiler. // Does not compile. package main func f() { switch { case 0; // ERROR "expecting := or = or : or comma|expected :" } switch { case 0; // ERROR "expecting := or = or : or comma|expected :" default: } switch { case 0: case 0: default: } switch { case 0: f(); case 0:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 01 22:37:04 UTC 2022 - 775 bytes - Viewed (0) -
src/go/scanner/scanner.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 19 12:02:03 UTC 2023 - 24.3K bytes - Viewed (0) -
src/cmd/go/internal/toolchain/switch.go
} } // NeedSwitch reports whether Switch would attempt to switch toolchains. func (s *Switcher) NeedSwitch() bool { return s.TooNew != nil && (HasAuto() || HasPath()) } // Switch decides whether to switch to a newer toolchain // to resolve any of the saved errors. // It switches if toolchain switches are permitted and there is at least one TooNewError. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 18:15:22 UTC 2024 - 7K bytes - Viewed (0) -
src/cmd/compile/internal/walk/switch.go
// expression switch. func walkSwitchExpr(sw *ir.SwitchStmt) { lno := ir.SetPos(sw) cond := sw.Tag sw.Tag = nil // convert switch {...} to switch true {...} if cond == nil { cond = ir.NewBool(base.Pos, true) cond = typecheck.Expr(cond) cond = typecheck.DefaultLit(cond, nil) } // Given "switch string(byteslice)", // with all cases being side-effect free,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 30.1K bytes - Viewed (0) -
src/cmd/compile/internal/syntax/parser.go
} return p.simpleStmt(lhs, 0) } switch p.tok { case _Var: return p.declStmt(p.varDecl) case _Const: return p.declStmt(p.constDecl) case _Type: return p.declStmt(p.typeDecl) } p.clearPragma() switch p.tok { case _Lbrace: return p.blockStmt("") case _Operator, _Star: switch p.op { case Add, Sub, Mul, And, Xor, Not:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 62.9K bytes - Viewed (0) -
test/switch6.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Sep 24 17:04:15 UTC 2022 - 1.1K bytes - Viewed (0) -
test/switch.go
// switch on nil-only comparison types switch f := func() {}; f { case nil: assert(false, "f should not be nil") default: } switch m := make(map[int]int); m { case nil: assert(false, "m should not be nil") default: } switch a := make([]int, 1); a { case nil: assert(false, "m should not be nil") default: } // switch on interface.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Jul 19 23:30:49 UTC 2022 - 6.5K bytes - Viewed (0) -
tensorflow/compiler/mlir/tensorflow/tests/mlir2graphdef/switchn.mlir
"tf_executor.yield"(%0) : (tensor<i32>) -> () }) : () -> (tensor<i32>, !tf_executor.control) %outputs_0:3, %control_1 = "tf_executor._SwitchN"(%outputs, %outputs) {T = i32, device = "", num_outs = 3 : i64} : (tensor<i32>, tensor<i32>) -> (tensor<*xi32>, tensor<*xi32>, tensor<*xi32>, !tf_executor.control) %outputs_2, %control_3 = "tf_executor.island"() ({
Registered: Sun Jun 16 05:45:23 UTC 2024 - Last Modified: Tue Mar 22 14:25:57 UTC 2022 - 4K bytes - Viewed (0) -
test/codegen/switch.go
// Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // These tests check code generation of switch statements. package codegen // see issue 33934 func f(x string) int { // amd64:-`cmpstring` switch x { case "": return -1 case "1", "2", "3": return -2 default: return -3 } } // use jump tables for 8+ int cases
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 18:39:50 UTC 2023 - 3.6K bytes - Viewed (0) -
src/net/internal/socktest/switch.go
package socktest import ( "fmt" "sync" ) // A Switch represents a callpath point switch for socket system // calls. type Switch struct { once sync.Once fmu sync.RWMutex fltab map[FilterType]Filter smu sync.RWMutex sotab Sockets stats stats } func (sw *Switch) init() { sw.fltab = make(map[FilterType]Filter) sw.sotab = make(Sockets)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 10 03:29:50 UTC 2024 - 4.8K bytes - Viewed (0)