Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for NewBar (0.18 sec)

  1. src/cmd/compile/internal/inline/inlheur/testdata/props/returns2.go

    // callsite: returns2.go:19:13|0 flagstr "" flagval 0 score 1 mask 16384 maskstr "returnFeedsConcreteToInterfaceCallAdj"
    // <endcallsites>
    // <endfuncpreamble>
    func T_return_feeds_iface_call() {
    	b := newBar(10)
    	b.Plark()
    }
    
    // returns2.go T_multi_return_feeds_iface_call 29 0 1
    // <endpropsdump>
    // {"Flags":0,"ParamFlags":null,"ResultFlags":null}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 16 20:15:01 UTC 2023
    - 5.7K bytes
    - Viewed (0)
  2. test/fixedbugs/issue5581.go

    // Copyright 2013 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    import "fmt"
    
    func NewBar() *Bar { return nil }
    
    func (x *Foo) Method() (int, error) {
    	for y := range x.m {
    		_ = y.A
    	}
    	return 0, nil
    }
    
    type Foo struct {
    	m map[*Bar]int
    }
    
    type Bar struct {
    	A *Foo
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 575 bytes
    - Viewed (0)
  3. subprojects/composite-builds/src/integTest/groovy/org/gradle/integtests/composite/plugins/PluginBuildsIntegrationTest.groovy

                }
                dependencies {
                    implementation("${build.group}:${build.buildName}")
                }
            """
            file("src/main/java/Foo.java") << """
                class Foo { Bar newBar() { return new Bar(); }}
            """
    
            then:
            succeeds("build")
            executed(":${build.buildName}:compileJava")
            executed(":compileJava")
            build.assertProjectPluginApplied()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jan 06 08:15:28 UTC 2023
    - 18.4K bytes
    - Viewed (0)
  4. test/escape2.go

    	**xxx = *yy
    }
    
    func foo18(y int) { // ERROR "moved to heap: y$"
    	*xxx = &y
    }
    
    func foo19(y int) {
    	**xxx = y
    }
    
    type Bar struct {
    	i  int
    	ii *int
    }
    
    func NewBar() *Bar {
    	return &Bar{42, nil} // ERROR "&Bar{...} escapes to heap$"
    }
    
    func NewBarp(x *int) *Bar { // ERROR "leaking param: x$"
    	return &Bar{42, x} // ERROR "&Bar{...} escapes to heap$"
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 35.1K bytes
    - Viewed (0)
  5. test/escape2n.go

    	**xxx = *yy
    }
    
    func foo18(y int) { // ERROR "moved to heap: y$"
    	*xxx = &y
    }
    
    func foo19(y int) {
    	**xxx = y
    }
    
    type Bar struct {
    	i  int
    	ii *int
    }
    
    func NewBar() *Bar {
    	return &Bar{42, nil} // ERROR "&Bar{...} escapes to heap$"
    }
    
    func NewBarp(x *int) *Bar { // ERROR "leaking param: x$"
    	return &Bar{42, x} // ERROR "&Bar{...} escapes to heap$"
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Dec 14 17:22:18 UTC 2023
    - 35.1K bytes
    - Viewed (0)
  6. src/go/types/interface.go

    		return &emptyInterface
    	}
    
    	// set method receivers if necessary
    	typ := (*Checker)(nil).newInterface()
    	for _, m := range methods {
    		if sig := m.typ.(*Signature); sig.recv == nil {
    			sig.recv = NewVar(m.pos, m.pkg, "", typ)
    		}
    	}
    
    	// sort for API stability
    	sortMethods(methods)
    
    	typ.methods = methods
    	typ.embeddeds = embeddeds
    	typ.complete = true
    
    	return typ
    }
    
    // check may be 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)
  7. src/cmd/compile/internal/types2/interface.go

    		return &emptyInterface
    	}
    
    	// set method receivers if necessary
    	typ := (*Checker)(nil).newInterface()
    	for _, m := range methods {
    		if sig := m.typ.(*Signature); sig.recv == nil {
    			sig.recv = NewVar(m.pos, m.pkg, "", typ)
    		}
    	}
    
    	// sort for API stability
    	sortMethods(methods)
    
    	typ.methods = methods
    	typ.embeddeds = embeddeds
    	typ.complete = true
    
    	return typ
    }
    
    // check may be 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)
  8. src/cmd/compile/internal/types2/context_test.go

    		nullaryQ = NewSignatureType(nil, nil, []*TypeParam{tparam}, nil, nil, false)
    	}
    	{
    		// type unaryP = func[P any](_ P)
    		tparam := NewTypeParam(NewTypeName(nopos, nil, "P", nil), &emptyInterface)
    		params := NewTuple(NewVar(nopos, nil, "_", tparam))
    		unaryP = NewSignatureType(nil, nil, []*TypeParam{tparam}, params, nil, false)
    	}
    
    	ctxt := NewContext()
    
    	// Update the context with an instantiation of nullaryP.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 17 04:32:02 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  9. src/go/types/context_test.go

    		nullaryQ = NewSignatureType(nil, nil, []*TypeParam{tparam}, nil, nil, false)
    	}
    	{
    		// type unaryP = func[P any](_ P)
    		tparam := NewTypeParam(NewTypeName(nopos, nil, "P", nil), &emptyInterface)
    		params := NewTuple(NewVar(nopos, nil, "_", tparam))
    		unaryP = NewSignatureType(nil, nil, []*TypeParam{tparam}, params, nil, false)
    	}
    
    	ctxt := NewContext()
    
    	// Update the context with an instantiation of nullaryP.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/universe.go

    	// type error interface{ Error() string }
    	{
    		obj := NewTypeName(nopos, nil, "error", nil)
    		obj.setColor(black)
    		typ := NewNamed(obj, nil, nil)
    
    		// error.Error() string
    		recv := NewVar(nopos, nil, "", typ)
    		res := NewVar(nopos, nil, "", Typ[String])
    		sig := NewSignatureType(recv, nil, nil, nil, NewTuple(res), false)
    		err := NewFunc(nopos, nil, "Error", sig)
    
    		// interface{ Error() string }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top