Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for isTerminatingList (0.21 sec)

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

    	case *syntax.BlockStmt:
    		return check.isTerminatingList(s.List, "")
    
    	case *syntax.IfStmt:
    		if s.Else != nil &&
    			check.isTerminating(s.Then, "") &&
    			check.isTerminating(s.Else, "") {
    			return true
    		}
    
    	case *syntax.SwitchStmt:
    		return check.isTerminatingSwitch(s.Body, label)
    
    	case *syntax.SelectStmt:
    		for _, cc := range s.Body {
    			if !check.isTerminatingList(cc.Body, "") || hasBreakList(cc.Body, label, true) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  2. src/go/types/return.go

    		for _, s := range s.Body.List {
    			cc := s.(*ast.CommClause)
    			if !check.isTerminatingList(cc.Body, "") || hasBreakList(cc.Body, label, true) {
    				return false
    			}
    
    		}
    		return true
    
    	case *ast.ForStmt:
    		if s.Cond == nil && !hasBreak(s.Body, label, true) {
    			return true
    		}
    	}
    
    	return false
    }
    
    func (check *Checker) isTerminatingList(list []ast.Stmt, label string) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 22 19:32:17 UTC 2024
    - 4.2K bytes
    - Viewed (0)
Back to top