Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for funcInst (0.15 sec)

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

    //
    // There are two modes of operation:
    //
    //  1. If infer == true, funcInst infers missing type arguments as needed and
    //     instantiates the function x. The returned results are nil.
    //
    //  2. If infer == false and inst provides all type arguments, funcInst
    //     instantiates the function x. The returned results are nil.
    //     If inst doesn't provide enough type arguments, funcInst returns the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  2. src/go/types/call.go

    //
    // There are two modes of operation:
    //
    //  1. If infer == true, funcInst infers missing type arguments as needed and
    //     instantiates the function x. The returned results are nil.
    //
    //  2. If infer == false and inst provides all type arguments, funcInst
    //     instantiates the function x. The returned results are nil.
    //     If inst doesn't provide enough type arguments, funcInst returns the
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  3. src/go/types/expr.go

    	switch t := x.typ.(type) {
    	case *Alias, *Named:
    		if isGeneric(t) {
    			what = "type"
    		}
    	case *Signature:
    		if t.tparams != nil {
    			if enableReverseTypeInference && T != nil {
    				check.funcInst(T, x.Pos(), x, nil, true)
    				return
    			}
    			what = "function"
    		}
    	}
    	if what != "" {
    		check.errorf(x.expr, WrongTypeArgCount, "cannot use generic %s %s without instantiation", what, x.expr)
    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

    	switch t := x.typ.(type) {
    	case *Alias, *Named:
    		if isGeneric(t) {
    			what = "type"
    		}
    	case *Signature:
    		if t.tparams != nil {
    			if enableReverseTypeInference && T != nil {
    				check.funcInst(T, x.Pos(), x, nil, true)
    				return
    			}
    			what = "function"
    		}
    	}
    	if what != "" {
    		check.errorf(x.expr, WrongTypeArgCount, "cannot use generic %s %s without instantiation", what, x.expr)
    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/printer/example_test.go

    	// file set fset.
    	funcAST, fset := parseFunc("example_test.go", "printSelf")
    
    	// Print the function body into buffer buf.
    	// The file set is provided to the printer so that it knows
    	// about the original source formatting and can add additional
    	// line breaks where they were present in the source.
    	var buf bytes.Buffer
    	printer.Fprint(&buf, fset, funcAST.Body)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 16 14:55:02 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  6. src/cmd/cgo/internal/testplugin/testdata/host/host.go

    // the command line do not have overlapping symbols. That is,
    // unnamed1.so/FuncInt and unnamed2.so/FuncInt should be distinct functions.
    func testUnnamed() {
    	p, err := plugin.Open("unnamed1.so")
    	if err != nil {
    		log.Fatalf(`plugin.Open("unnamed1.so"): %v`, err)
    	}
    	fn, err := p.Lookup("FuncInt")
    	if err != nil {
    		log.Fatalf(`unnamed1.so: Lookup("FuncInt") failed: %v`, err)
    	}
    	if got, want := fn.(func() int)(), 1; got != want {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 4.9K bytes
    - Viewed (0)
  7. src/cmd/cgo/internal/testplugin/testdata/unnamed2/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build ignore
    
    package main
    
    // // No C code required.
    import "C"
    
    func FuncInt() int { return 2 }
    
    func FuncRecursive() X { return X{} }
    
    type Y struct {
    	X *X
    }
    type X struct {
    	Y Y
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 366 bytes
    - Viewed (0)
  8. src/cmd/cgo/internal/testplugin/testdata/unnamed1/main.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    //go:build ignore
    
    package main
    
    // // No C code required.
    import "C"
    
    func FuncInt() int { return 1 }
    
    // Add a recursive type to check that type equality across plugins doesn't
    // crash. See https://golang.org/issues/19258
    func FuncRecursive() X { return X{} }
    
    type Y struct {
    	X *X
    }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 487 bytes
    - Viewed (0)
  9. src/go/types/subst.go

    			// This is ok; lazy type set computation will determine the actual type set
    			// in normal form.
    			return &Union{terms}
    		}
    
    	case *Interface:
    		methods, mcopied := subst.funcList(t.methods)
    		embeddeds, ecopied := subst.typeList(t.embeddeds)
    		if mcopied || ecopied {
    			iface := subst.check.newInterface()
    			iface.embeddeds = embeddeds
    			iface.embedPos = t.embedPos
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/subst.go

    			// This is ok; lazy type set computation will determine the actual type set
    			// in normal form.
    			return &Union{terms}
    		}
    
    	case *Interface:
    		methods, mcopied := subst.funcList(t.methods)
    		embeddeds, ecopied := subst.typeList(t.embeddeds)
    		if mcopied || ecopied {
    			iface := subst.check.newInterface()
    			iface.embeddeds = embeddeds
    			iface.embedPos = t.embedPos
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:04:07 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top