Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for TypeSwitchCase (0.33 sec)

  1. src/cmd/compile/internal/types2/stmt.go

    			if len(cases) != 1 || T == nil {
    				T = x.typ
    			}
    			obj := NewVar(lhs.Pos(), check.pkg, lhs.Value, T)
    			// TODO(mdempsky): Just use clause.Colon? Why did I even suggest
    			// "at the end of the TypeSwitchCase" in go.dev/issue/16794 instead?
    			scopePos := clause.Pos() // for default clause (len(List) == 0)
    			if n := len(cases); n > 0 {
    				scopePos = syntax.EndPos(cases[n-1])
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  2. doc/go1.17_spec.html

    TypeCaseClause  = TypeSwitchCase ":" StatementList .
    TypeSwitchCase  = "case" TypeList | "default" .
    TypeList        = Type { "," Type } .
    </pre>
    
    <p>
    The TypeSwitchGuard may include a
    <a href="#Short_variable_declarations">short variable declaration</a>.
    When that form is used, the variable is declared at the end of the
    TypeSwitchCase in the <a href="#Blocks">implicit block</a> of each clause.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  3. doc/go_spec.html

    TypeSwitchGuard = [ identifier ":=" ] PrimaryExpr "." "(" "type" ")" .
    TypeCaseClause  = TypeSwitchCase ":" StatementList .
    TypeSwitchCase  = "case" TypeList | "default" .
    </pre>
    
    <p>
    The TypeSwitchGuard may include a
    <a href="#Short_variable_declarations">short variable declaration</a>.
    When that form is used, the variable is declared at the end of the
    TypeSwitchCase in the <a href="#Blocks">implicit block</a> of each clause.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (1)
Back to top