Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 397 for typeSet (0.68 sec)

  1. src/go/types/typeset.go

    // Implementation
    
    // hasTerms reports whether the type set has specific type terms.
    func (s *_TypeSet) hasTerms() bool { return !s.terms.isEmpty() && !s.terms.isAll() }
    
    // subsetOf reports whether s1 ⊆ s2.
    func (s1 *_TypeSet) subsetOf(s2 *_TypeSet) bool { return s1.terms.subsetOf(s2.terms) }
    
    // TODO(gri) TypeSet.is and TypeSet.underIs should probably also go into termlist.go
    
    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

    // Implementation
    
    // hasTerms reports whether the type set has specific type terms.
    func (s *_TypeSet) hasTerms() bool { return !s.terms.isEmpty() && !s.terms.isAll() }
    
    // subsetOf reports whether s1 ⊆ s2.
    func (s1 *_TypeSet) subsetOf(s2 *_TypeSet) bool { return s1.terms.subsetOf(s2.terms) }
    
    // TODO(gri) TypeSet.is and TypeSet.underIs should probably also go into termlist.go
    
    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/go/types/instantiate.go

    	if !Ti.typeSet().hasTerms() {
    		return checkComparability() // nothing to do
    	}
    
    	// If V is itself an interface, each of its possible types must be in the set
    	// of T types (i.e., the V type set must be a subset of the T type set).
    	// Interfaces V with empty type sets were already excluded above.
    	if Vi != nil {
    		if !Vi.typeSet().subsetOf(Ti.typeSet()) {
    			// TODO(gri) report which type is missing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/instantiate.go

    	if !Ti.typeSet().hasTerms() {
    		return checkComparability() // nothing to do
    	}
    
    	// If V is itself an interface, each of its possible types must be in the set
    	// of T types (i.e., the V type set must be a subset of the T type set).
    	// Interfaces V with empty type sets were already excluded above.
    	if Vi != nil {
    		if !Vi.typeSet().subsetOf(Ti.typeSet()) {
    			// TODO(gri) report which type is missing
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  5. docs/en/mkdocs.insiders.yml

    plugins:
      social:
        cards_layout_dir: ../en/layouts
        cards_layout: custom
        cards_layout_options:
          logo: ../en/docs/img/icon-white.svg
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Apr 19 00:56:59 UTC 2024
    - 159 bytes
    - Viewed (0)
  6. src/go/types/typeparam.go

    func (t *TypeParam) is(f func(*term) bool) bool {
    	return t.iface().typeSet().is(f)
    }
    
    // underIs calls f with the underlying types of the specific type terms
    // of t's constraint and reports whether all calls to f returned true.
    // If there are no specific terms, underIs returns the result of f(nil).
    func (t *TypeParam) underIs(f func(Type) bool) bool {
    	return t.iface().typeSet().underIs(f)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/typestring.go

    		}
    
    	default:
    		// For externally defined implementations of Type.
    		// Note: In this case cycles won't be caught.
    		w.string(t.String())
    	}
    }
    
    // typeSet writes a canonical hash for an interface type set.
    func (w *typeWriter) typeSet(s *_TypeSet) {
    	assert(w.ctxt != nil)
    	first := true
    	for _, m := range s.methods {
    		if !first {
    			w.byte(';')
    		}
    		first = false
    		w.string(m.name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  8. src/go/types/typestring.go

    		}
    
    	default:
    		// For externally defined implementations of Type.
    		// Note: In this case cycles won't be caught.
    		w.string(t.String())
    	}
    }
    
    // typeSet writes a canonical hash for an interface type set.
    func (w *typeWriter) typeSet(s *_TypeSet) {
    	assert(w.ctxt != nil)
    	first := true
    	for _, m := range s.methods {
    		if !first {
    			w.byte(';')
    		}
    		first = false
    		w.string(m.name)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 12.3K bytes
    - Viewed (0)
  9. src/go/types/predicates.go

    			if reportf != nil {
    				reportf("%s cannot be compared", t)
    			}
    			return false
    		}
    		return true
    	case *Interface:
    		if dynamic && !isTypeParam(T) || t.typeSet().IsComparable(seen) {
    			return true
    		}
    		if reportf != nil {
    			if t.typeSet().IsEmpty() {
    				reportf("empty type set")
    			} else {
    				reportf("incomparable types in type set")
    			}
    		}
    		// fallthrough
    	}
    	return false
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/typeparam.go

    func (t *TypeParam) is(f func(*term) bool) bool {
    	return t.iface().typeSet().is(f)
    }
    
    // underIs calls f with the underlying types of the specific type terms
    // of t's constraint and reports whether all calls to f returned true.
    // If there are no specific terms, underIs returns the result of f(nil).
    func (t *TypeParam) underIs(f func(Type) bool) bool {
    	return t.iface().typeSet().underIs(f)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 20:03:31 UTC 2024
    - 4.9K bytes
    - Viewed (0)
Back to top