Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 40 for typeswitches (0.18 sec)

  1. src/go/printer/testdata/comments.golden

    	}
    	if x < 0 {	/* the tab printed before this comment's /* must not affect the remaining lines */
    		return -x	// this statement should be properly indented
    	}
    	return x
    }
    
    func typeswitch(x interface{}) {
    	switch v := x.(type) {
    	case bool, int, float:
    	case string:
    	default:
    	}
    
    	switch x.(type) {
    	}
    
    	switch v0, ok := x.(int); v := x.(type) {
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 25 23:11:14 UTC 2022
    - 11.3K bytes
    - Viewed (0)
  2. src/go/types/expr.go

    	return x
    }
    
    // typeAssertion checks x.(T). The type of x must be an interface.
    func (check *Checker) typeAssertion(e ast.Expr, x *operand, T Type, typeSwitch bool) {
    	var cause string
    	if check.assertableTo(x.typ, T, &cause) {
    		return // success
    	}
    
    	if typeSwitch {
    		check.errorf(e, ImpossibleAssert, "impossible type switch case: %s\n\t%s cannot have dynamic type %s %s", e, x, T, cause)
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  3. tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.cc

    #include "tensorflow/compiler/mlir/tensorflow/transforms/lower_tf.h"
    
    #include <numeric>
    
    #include "llvm/ADT/ArrayRef.h"
    #include "llvm/ADT/SmallVector.h"
    #include "llvm/ADT/TypeSwitch.h"
    #include "mlir/IR/Attributes.h"  // from @llvm-project
    #include "mlir/IR/BuiltinAttributes.h"  // from @llvm-project
    #include "mlir/IR/BuiltinTypes.h"  // from @llvm-project
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 74.9K bytes
    - Viewed (0)
  4. src/go/parser/parser_test.go

    	{name: "switch", format: "package main; func main() { «switch { default: «» }»}", scope: true, scopeMultiplier: 2},               // Scopes: TypeSwitchStmt, CaseClause
    	{name: "typeswitch", format: "package main; func main() { «switch x.(type) { default: «» }» }", scope: true, scopeMultiplier: 2}, // Scopes: TypeSwitchStmt, CaseClause
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 24.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/expr.go

    }
    
    // typeAssertion checks x.(T). The type of x must be an interface.
    func (check *Checker) typeAssertion(e syntax.Expr, x *operand, T Type, typeSwitch bool) {
    	var cause string
    	if check.assertableTo(x.typ, T, &cause) {
    		return // success
    	}
    
    	if typeSwitch {
    		check.errorf(e, ImpossibleAssert, "impossible type switch case: %s\n\t%s cannot have dynamic type %s %s", e, x, T, cause)
    		return
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  6. src/go/parser/parser.go

    		}
    		p.exprLev = prevLev
    	}
    
    	typeSwitch := p.isTypeSwitchGuard(s2)
    	lbrace := p.expect(token.LBRACE)
    	var list []ast.Stmt
    	for p.tok == token.CASE || p.tok == token.DEFAULT {
    		list = append(list, p.parseCaseClause())
    	}
    	rbrace := p.expect(token.RBRACE)
    	p.expectSemi()
    	body := &ast.BlockStmt{Lbrace: lbrace, List: list, Rbrace: rbrace}
    
    	if typeSwitch {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 08 20:07:50 UTC 2023
    - 72.2K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/lite/ir/tfl_ops.cc

    #include "llvm/ADT/APInt.h"
    #include "llvm/ADT/ArrayRef.h"
    #include "llvm/ADT/STLExtras.h"
    #include "llvm/ADT/SetVector.h"
    #include "llvm/ADT/SmallVector.h"
    #include "llvm/ADT/StringExtras.h"
    #include "llvm/ADT/TypeSwitch.h"
    #include "llvm/Support/FormatVariadic.h"
    #include "llvm/Support/Threading.h"
    #include "llvm/Support/raw_ostream.h"
    #include "mlir/Dialect/Arith/IR/Arith.h"  // from @llvm-project
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu May 02 09:41:17 UTC 2024
    - 169.2K bytes
    - Viewed (0)
  8. doc/go1.17_spec.html

    expressions evaluating to the same constant.
    For instance, the current compilers disallow duplicate integer,
    floating point, or string constants in case expressions.
    </p>
    
    <h4 id="Type_switches">Type switches</h4>
    
    <p>
    A type switch compares types rather than values. It is otherwise similar
    to an expression switch. It is marked by a special switch expression that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 20:22:45 UTC 2024
    - 211.6K bytes
    - Viewed (0)
  9. doc/go_spec.html

    expressions evaluating to the same constant.
    For instance, the current compilers disallow duplicate integer,
    floating point, or string constants in case expressions.
    </p>
    
    <h4 id="Type_switches">Type switches</h4>
    
    <p>
    A type switch compares types rather than values. It is otherwise similar
    to an expression switch. It is marked by a special switch expression that
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 21:07:21 UTC 2024
    - 281.5K bytes
    - Viewed (1)
  10. cmd/testdata/decryptObjectInfo.json.zst

    -Key":"IAAfAMtNqDvpQXX9+WI+d/A5Wx3STv4c8ZCX1mM5Hi+jLo/D9wTlId+w==","X-Minio-Internal-Server-Side-Encryption-Seal-Algorithm":"DAREv2-HMAC-SHA256","content-type":"application/octet-stream"}},{"Bucket":"buck1","Name":"go_113/src/cmd/gofmt/testdata/typeswitch.input","UserDef":{"X-Minio-Internal-Server-Side-Encryption-Iv":"6iylUVx1AAmkbPfRLAHq=","X-Minio-Internal-Server-Side-Encryption-S3-Kms-Key-Id":"my-minio-key","X-Minio-Internal-Server-Side-Encryption-S3-Kms-Sealed-Key":"IAAfAKKlxxS0jS/b7mIgHDIuR...
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Oct 29 16:34:20 UTC 2020
    - 164K bytes
    - Viewed (0)
Back to top