Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 9 of 9 for nonGeneric (0.2 sec)

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

    		G        = pkg.Scope().Lookup("G").Type()
    		SrcInst  = pkg.Scope().Lookup("Inst").Type()
    		UserInst = mustInstantiate(b, G, Typ[Int])
    	)
    
    	tests := []struct {
    		name string
    		typ  Type
    	}{
    		{"nongeneric", T},
    		{"generic", G},
    		{"src instance", SrcInst},
    		{"user instance", UserInst},
    	}
    
    	b.Run("Underlying", func(b *testing.B) {
    		for _, test := range tests {
    			b.Run(test.name, func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 16 21:06:56 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  2. src/go/types/named_test.go

    		G        = pkg.Scope().Lookup("G").Type()
    		SrcInst  = pkg.Scope().Lookup("Inst").Type()
    		UserInst = mustInstantiate(b, G, Typ[Int])
    	)
    
    	tests := []struct {
    		name string
    		typ  Type
    	}{
    		{"nongeneric", T},
    		{"generic", G},
    		{"src instance", SrcInst},
    		{"user instance", UserInst},
    	}
    
    	b.Run("Underlying", func(b *testing.B) {
    		for _, test := range tests {
    			b.Run(test.name, func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 05 16:29:58 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  3. src/go/types/index.go

    		if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
    			// function instantiation
    			return true
    		}
    	}
    
    	// x should not be generic at this point, but be safe and check
    	check.nonGeneric(nil, x)
    	if x.mode == invalid {
    		return false
    	}
    
    	// ordinary index expression
    	valid := false
    	length := int64(-1) // valid if >= 0
    	switch typ := under(x.typ).(type) {
    	case *Basic:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jan 22 16:17:05 UTC 2024
    - 11.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/index.go

    		if sig, _ := under(x.typ).(*Signature); sig != nil && sig.TypeParams().Len() > 0 {
    			// function instantiation
    			return true
    		}
    	}
    
    	// x should not be generic at this point, but be safe and check
    	check.nonGeneric(nil, x)
    	if x.mode == invalid {
    		return false
    	}
    
    	// ordinary index expression
    	valid := false
    	length := int64(-1) // valid if >= 0
    	switch typ := under(x.typ).(type) {
    	case *Basic:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 15 16:16:58 UTC 2023
    - 11.5K bytes
    - Viewed (0)
  5. src/go/types/expr.go

    	if !allowGeneric {
    		check.nonGeneric(T, x)
    	}
    
    	check.record(x)
    
    	return kind
    }
    
    // If x is a generic type, or a generic function whose type arguments cannot be inferred
    // from a non-nil target T, nonGeneric reports an error and invalidates x.mode and x.typ.
    // Otherwise it leaves x alone.
    func (check *Checker) nonGeneric(T *target, x *operand) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 49.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/expr.go

    	if !allowGeneric {
    		check.nonGeneric(T, x)
    	}
    
    	check.record(x)
    
    	return kind
    }
    
    // If x is a generic type, or a generic function whose type arguments cannot be inferred
    // from a non-nil target T, nonGeneric reports an error and invalidates x.mode and x.typ.
    // Otherwise it leaves x alone.
    func (check *Checker) nonGeneric(T *target, x *operand) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 02:09:54 UTC 2024
    - 51.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/call.go

    	}
    	// x.typ may be generic
    
    	switch x.mode {
    	case invalid:
    		check.use(call.ArgList...)
    		x.expr = call
    		return statement
    
    	case typexpr:
    		// conversion
    		check.nonGeneric(nil, x)
    		if x.mode == invalid {
    			return conversion
    		}
    		T := x.typ
    		x.mode = invalid
    		switch n := len(call.ArgList); n {
    		case 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 31.5K bytes
    - Viewed (0)
  8. src/go/types/call.go

    	}
    	// x.typ may be generic
    
    	switch x.mode {
    	case invalid:
    		check.use(call.Args...)
    		x.expr = call
    		return statement
    
    	case typexpr:
    		// conversion
    		check.nonGeneric(nil, x)
    		if x.mode == invalid {
    			return conversion
    		}
    		T := x.typ
    		x.mode = invalid
    		switch n := len(call.Args); n {
    		case 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 33.5K bytes
    - Viewed (0)
  9. platforms/core-configuration/kotlin-dsl/src/test/kotlin/org/gradle/kotlin/dsl/DelegatedGradlePropertiesExtensionsTest.kt

            dynamicObjectMockFor(existing, absent).let { dynamicObject ->
                val serviceRegistryMock = mock<ServiceRegistry> {
                    onGeneric { get<DynamicLookupRoutine>() } doReturn DefaultDynamicLookupRoutine()
                }
                val gradleInternalMock = mock<GradleInternal>(name = "gradleInternal") {
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Jun 07 15:44:53 UTC 2024
    - 8.3K bytes
    - Viewed (0)
Back to top