Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 12 for isAll (0.08 sec)

  1. src/go/types/typeset.go

    	comparable bool     // invariant: !comparable || terms.isAll()
    }
    
    // IsEmpty reports whether type set s is the empty set.
    func (s *_TypeSet) IsEmpty() bool { return s.terms.isEmpty() }
    
    // IsAll reports whether type set s is the set of all types (corresponding to the empty interface).
    func (s *_TypeSet) IsAll() bool { return s.IsMethodSet() && len(s.methods) == 0 }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 13.7K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/typeset.go

    	comparable bool     // invariant: !comparable || terms.isAll()
    }
    
    // IsEmpty reports whether type set s is the empty set.
    func (s *_TypeSet) IsEmpty() bool { return s.terms.isEmpty() }
    
    // IsAll reports whether type set s is the set of all types (corresponding to the empty interface).
    func (s *_TypeSet) IsAll() bool { return s.IsMethodSet() && len(s.methods) == 0 }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/termlist.go

    	// one iteration.
    	for _, x := range xl {
    		if x != nil {
    			return false
    		}
    	}
    	return true
    }
    
    // isAll reports whether the termlist xl represents the set of all types.
    func (xl termlist) isAll() bool {
    	// If there's a 𝓤 term, the entire list is 𝓤.
    	// If the termlist is in normal form, this requires at most
    	// one iteration.
    	for _, x := range xl {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 03 18:29:30 UTC 2022
    - 3.8K bytes
    - Viewed (0)
  4. src/cmd/vendor/golang.org/x/tools/internal/typeparams/termlist.go

    	// one iteration.
    	for _, x := range xl {
    		if x != nil {
    			return false
    		}
    	}
    	return true
    }
    
    // isAll reports whether the termlist xl represents the set of all types.
    func (xl termlist) isAll() bool {
    	// If there's a 𝓤 term, the entire list is 𝓤.
    	// If the termlist is in normal form, this requires at most
    	// one iteration.
    	for _, x := range xl {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 21 21:08:44 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  5. src/go/types/termlist_test.go

    		"~int | myInt":  false,
    		"∅ | ∅ | 𝓤":     true,
    		"𝓤":             true,
    		"𝓤 | int":       true,
    		"myInt | 𝓤":     true,
    	} {
    		xl := maketl(test)
    		got := xl.isAll()
    		if got != want {
    			t.Errorf("(%v).isAll() == %v; want %v", test, got, want)
    		}
    	}
    }
    
    func TestTermlistNorm(t *testing.T) {
    	for _, test := range []struct {
    		xl, want string
    	}{
    		{"∅", "∅"},
    		{"∅ | ∅", "∅"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/termlist_test.go

    		"~int | myInt":  false,
    		"∅ | ∅ | 𝓤":     true,
    		"𝓤":             true,
    		"𝓤 | int":       true,
    		"myInt | 𝓤":     true,
    	} {
    		xl := maketl(test)
    		got := xl.isAll()
    		if got != want {
    			t.Errorf("(%v).isAll() == %v; want %v", test, got, want)
    		}
    	}
    }
    
    func TestTermlistNorm(t *testing.T) {
    	for _, test := range []struct {
    		xl, want string
    	}{
    		{"∅", "∅"},
    		{"∅ | ∅", "∅"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 07 21:37:14 UTC 2022
    - 7.2K bytes
    - Viewed (0)
  7. src/go/types/termlist.go

    	// one iteration.
    	for _, x := range xl {
    		if x != nil {
    			return false
    		}
    	}
    	return true
    }
    
    // isAll reports whether the termlist xl represents the set of all types.
    func (xl termlist) isAll() bool {
    	// If there's a 𝓤 term, the entire list is 𝓤.
    	// If the termlist is in normal form, this requires at most
    	// one iteration.
    	for _, x := range xl {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/interface.go

    // The methods are ordered by their unique Id.
    func (t *Interface) Method(i int) *Func { return t.typeSet().Method(i) }
    
    // Empty reports whether t is the empty interface.
    func (t *Interface) Empty() bool { return t.typeSet().IsAll() }
    
    // IsComparable reports whether each type in interface t's type set is comparable.
    func (t *Interface) IsComparable() bool { return t.typeSet().IsComparable(nil) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 6.2K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/typeparams/normalize.go

    	tset, err := computeTermSetInternal(typ, make(map[types.Type]*termSet), 0)
    	if err != nil {
    		return nil, err
    	}
    	if tset.terms.isEmpty() {
    		return nil, ErrEmptyTypeSet
    	}
    	if tset.terms.isAll() {
    		return nil, nil
    	}
    	var terms []*types.Term
    	for _, term := range tset.terms {
    		terms = append(terms, types.NewTerm(term.tilde, term.typ))
    	}
    	return terms, nil
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 18 21:28:13 UTC 2023
    - 6.7K bytes
    - Viewed (0)
  10. src/go/types/interface.go

    // The methods are ordered by their unique Id.
    func (t *Interface) Method(i int) *Func { return t.typeSet().Method(i) }
    
    // Empty reports whether t is the empty interface.
    func (t *Interface) Empty() bool { return t.typeSet().IsAll() }
    
    // IsComparable reports whether each type in interface t's type set is comparable.
    func (t *Interface) IsComparable() bool { return t.typeSet().IsComparable(nil) }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 8.1K bytes
    - Viewed (0)
Back to top