Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for typeSwitch (0.19 sec)

  1. 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)
  2. 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)
  3. 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)
  4. 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)
Back to top