Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for HasNil (0.23 sec)

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

    	}
    	return false
    }
    
    // hasNil reports whether type t includes the nil value.
    func hasNil(t Type) bool {
    	switch u := under(t).(type) {
    	case *Basic:
    		return u.kind == UnsafePointer
    	case *Slice, *Pointer, *Signature, *Map, *Chan:
    		return true
    	case *Interface:
    		return !isTypeParam(t) || u.typeSet().underIs(func(u Type) bool {
    			return u != nil && hasNil(u)
    		})
    	}
    	return false
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:01:18 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  2. src/go/types/predicates.go

    	}
    	return false
    }
    
    // hasNil reports whether type t includes the nil value.
    func hasNil(t Type) bool {
    	switch u := under(t).(type) {
    	case *Basic:
    		return u.kind == UnsafePointer
    	case *Slice, *Pointer, *Signature, *Map, *Chan:
    		return true
    	case *Interface:
    		return !isTypeParam(t) || u.typeSet().underIs(func(u Type) bool {
    			return u != nil && hasNil(u)
    		})
    	}
    	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)
  3. src/go/types/expr.go

    		if allString(x.typ) != allString(y.typ) {
    			return false
    		}
    		// Untyped nil can only convert to a type that has a nil.
    		if x.isNil() {
    			return hasNil(y.typ)
    		}
    		if y.isNil() {
    			return hasNil(x.typ)
    		}
    		// An untyped operand cannot convert to a pointer.
    		// TODO(gri) generalize to type parameters
    		if isPointer(x.typ) || isPointer(y.typ) {
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/expr.go

    		if allString(x.typ) != allString(y.typ) {
    			return false
    		}
    		// Untyped nil can only convert to a type that has a nil.
    		if x.isNil() {
    			return hasNil(y.typ)
    		}
    		if y.isNil() {
    			return hasNil(x.typ)
    		}
    		// An untyped operand cannot convert to a pointer.
    		// TODO(gri) generalize to type parameters
    		if isPointer(x.typ) || isPointer(y.typ) {
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  5. src/go/types/stmt.go

    			// By checking assignment of x to an invisible temporary
    			// (as a compiler would), we get all the relevant checks.
    			check.assignment(&x, nil, "switch expression")
    			if x.mode != invalid && !Comparable(x.typ) && !hasNil(x.typ) {
    				check.errorf(&x, InvalidExprSwitch, "cannot switch on %s (%s is not comparable)", &x, x.typ)
    				x.mode = invalid
    			}
    		} else {
    			// spec: "A missing switch expression is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stmt.go

    		// By checking assignment of x to an invisible temporary
    		// (as a compiler would), we get all the relevant checks.
    		check.assignment(&x, nil, "switch expression")
    		if x.mode != invalid && !Comparable(x.typ) && !hasNil(x.typ) {
    			check.errorf(&x, InvalidExprSwitch, "cannot switch on %s (%s is not comparable)", &x, x.typ)
    			x.mode = invalid
    		}
    	} else {
    		// spec: "A missing switch expression is
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. docs/tr/docs/features.md

    Bütün **FastAPI** frameworkü oto-tamamlama açısından geliştiriciyi tatmin etmek üzerine tasarlandı. Otomatik tamamlama her yerde çalışıyor.
    
    Dokümantasyona tekrardan çok nadir olarak geleceksin.
    
    Editörün sana nasıl yardım ettiğine bir bak:
    
    * <a href="https://code.visualstudio.com/" class="external-link" target="_blank">Visual Studio Code</a> ile:
    
    ![editor support](https://fastapi.tiangolo.com/img/vscode-completion.png)
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  8. docs/tr/docs/how-to/general.md

    # Genel - Nasıl Yapılır - Tarifler
    
    Bu sayfada genel ve sıkça sorulan sorular için dokümantasyonun diğer sayfalarına yönlendirmeler bulunmaktadır.
    
    ## Veri Filtreleme - Güvenlik
    
    Döndürmeniz gereken veriden fazlasını döndürmediğinizden emin olmak için, [Tutorial - Response Model - Return Type](../tutorial/response-model.md){.internal-link target=_blank} sayfasını okuyun.
    
    ## Dokümantasyon Etiketleri - OpenAPI
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon May 27 16:20:52 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  9. docs/tr/docs/async.md

    
    Yani yumurta mı tavukdan, tavuk mu yumurtadan gibi ilk `async` fonksiyonu nasıl çağırılır?
    
    **FastAPI** ile çalışıyorsanız bunun için endişelenmenize gerek yok, çünkü bu "ilk" fonksiyon sizin *path fonksiyonunuz* olacak ve FastAPI doğru olanı nasıl yapacağını bilecek.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 21.9K bytes
    - Viewed (0)
  10. docs/tr/docs/index.md

    **Spoiler**: Öğretici - Kullanıcı rehberi şunları içerir:
    
    * **Parameterlerin**, **headers**, **çerezler**, **form alanları** ve **dosyalar** olarak tanımlanması.
    * `maximum_length` ya da `regex` gibi **doğrulama kısıtlamalarının** nasıl yapılabileceği.
    * Çok güçlü ve kullanımı kolay **<abbr title="Bağımlılık Enjeksiyonu: components, resources, providers, services, injectables olarak da biliniyor.">Bağımlılık Enjeksiyonu</abbr>** sistemi oluşturmayı.
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Mon Apr 29 05:18:04 UTC 2024
    - 21.9K bytes
    - Viewed (0)
Back to top