Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for HasNil (0.45 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/cmd/compile/internal/typecheck/const.go

    	if n.Type().Kind() == types.TNIL {
    		if n.Op() != ir.ONIL {
    			base.Fatalf("unexpected op: %v (%v)", n, n.Op())
    		}
    		n = ir.Copy(n)
    		if t == nil {
    			base.Fatalf("use of untyped nil")
    		}
    
    		if !t.HasNil() {
    			// Leave for caller to handle.
    			return n
    		}
    
    		n.SetType(t)
    		return n
    	}
    
    	if t == nil || !ir.OKForConst[t.Kind()] {
    		t = defaultType(n.Type())
    	}
    
    	switch n.Op() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 10.5K bytes
    - Viewed (0)
  4. 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)
  5. 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)
  6. docs/tr/docs/alternatives.md

    Ama... Python'un tip belirteçleri gelmeden önce oluşturulmuştu. Yani her <abbr title="Verilerin nasıl oluşturulması gerektiğinin tanımı">şemayı</abbr> tanımlamak için Marshmallow'un sunduğu spesifik araçları ve sınıfları kullanmanız gerekiyordu.
    
    !!! check "**FastAPI**'a nasıl ilham verdi?"
        Kod kullanarak otomatik olarak veri tipini ve veri doğrulamayı belirten "şemalar" tanımlamalı.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Fri Mar 22 01:42:11 UTC 2024
    - 28.8K 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/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)
  9. docs/tr/docs/tutorial/first-steps.md

    #### API "Şeması"
    
    Bu durumda, <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a>, API şemasını nasıl tanımlayacağınızı belirten bir şartnamedir.
    
    Bu şema tanımı, API yollarınızla birlikte yollarınızın aldığı olası parametreler gibi tanımlamaları içerir.
    
    #### Veri "Şeması"
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Feb 08 13:10:55 UTC 2024
    - 10.6K 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