Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 215 for noposn (0.15 sec)

  1. src/go/types/universe.go

    		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 }
    		ityp := &Interface{methods: []*Func{err}, complete: true}
    		computeInterfaceTypeSet(nil, nopos, ityp) // prevent races due to lazy computation of tset
    
    		typ.SetUnderlying(ityp)
    		def(obj)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 9.3K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/types2/errors_test.go

    	if got := err.msg(); got != want {
    		t.Errorf("empty error: got %q, want %q", got, want)
    	}
    
    	want = "foo 42"
    	err.addf(nopos, "foo %d", 42)
    	if got := err.msg(); got != want {
    		t.Errorf("simple error: got %q, want %q", got, want)
    	}
    
    	want = "foo 42\n\tbar 43"
    	err.addf(nopos, "bar %d", 43)
    	if got := err.msg(); got != want {
    		t.Errorf("simple error: got %q, want %q", got, want)
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 23 21:21:43 UTC 2024
    - 979 bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/context_test.go

    	var nullaryP, nullaryQ, unaryP Type
    	{
    		// type nullaryP = func[P any]()
    		tparam := NewTypeParam(NewTypeName(nopos, nil, "P", nil), &emptyInterface)
    		nullaryP = NewSignatureType(nil, nil, []*TypeParam{tparam}, nil, nil, false)
    	}
    	{
    		// type nullaryQ = func[Q any]()
    		tparam := NewTypeParam(NewTypeName(nopos, nil, "Q", nil), &emptyInterface)
    		nullaryQ = NewSignatureType(nil, nil, []*TypeParam{tparam}, nil, nil, false)
    	}
    	{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 17 04:32:02 UTC 2021
    - 2.3K bytes
    - Viewed (0)
  4. src/go/types/context_test.go

    	var nullaryP, nullaryQ, unaryP Type
    	{
    		// type nullaryP = func[P any]()
    		tparam := NewTypeParam(NewTypeName(nopos, nil, "P", nil), &emptyInterface)
    		nullaryP = NewSignatureType(nil, nil, []*TypeParam{tparam}, nil, nil, false)
    	}
    	{
    		// type nullaryQ = func[Q any]()
    		tparam := NewTypeParam(NewTypeName(nopos, nil, "Q", nil), &emptyInterface)
    		nullaryQ = NewSignatureType(nil, nil, []*TypeParam{tparam}, nil, nil, false)
    	}
    	{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  5. platforms/jvm/language-java/src/test/groovy/org/gradle/api/internal/tasks/compile/DiagnosticToProblemListenerTest.groovy

            diagnostic.source >> Mock(JavaFileObject) {
                name >> "SomeFile.java"
            }
            diagnostic.lineNumber | diagnostic.columnNumber | diagnostic.startPosition | diagnostic.endPosition >> Diagnostic.NOPOS
    
            when:
            diagnosticToProblemListener.buildProblem(diagnostic, spec)
    
            then:
            1 * spec.fileLocation("SomeFile.java")
            0 * spec.lineInFileLocation(_)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu May 30 13:58:13 UTC 2024
    - 6.2K bytes
    - Viewed (0)
  6. platforms/jvm/language-java/src/main/java/org/gradle/api/internal/tasks/compile/DiagnosticToProblemListener.java

                // (documentation says that getEndPosition() will be NOPOS iff getPosition() is NOPOS)
                if (0 < position) {
                    // ... we can report the start and extent
                    spec.offsetInFileLocation(resourceName, position, end - position);
                }
            }
        }
    
        /**
         * Clamp the value to an int, or return {@link Diagnostic#NOPOS} if the value is too large.
         * <p>
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Thu Jun 06 06:17:43 UTC 2024
    - 11.5K bytes
    - Viewed (0)
  7. src/go/token/position.go

    type Pos int
    
    // The zero value for [Pos] is NoPos; there is no file and line information
    // associated with it, and NoPos.IsValid() is false. NoPos is always
    // smaller than any other [Pos] value. The corresponding [Position] value
    // for NoPos is the zero value for [Position].
    const NoPos Pos = 0
    
    // IsValid reports whether the position is valid.
    func (p Pos) IsValid() bool {
    	return p != NoPos
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  8. src/go/token/position_test.go

    		t.Errorf("%s: got column = %d; want %d", msg, got.Column, want.Column)
    	}
    }
    
    func TestNoPos(t *testing.T) {
    	if NoPos.IsValid() {
    		t.Errorf("NoPos should not be valid")
    	}
    	var fset *FileSet
    	checkPos(t, "nil NoPos", fset.Position(NoPos), Position{})
    	fset = NewFileSet()
    	checkPos(t, "fset NoPos", fset.Position(NoPos), Position{})
    }
    
    var tests = []struct {
    	filename string
    	source   []byte // may be nil
    	size     int
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jan 31 20:26:14 UTC 2024
    - 14.3K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/types2/package.go

    }
    
    // NewPackage returns a new Package for the given package path and name.
    // The package is not complete and contains no explicit imports.
    func NewPackage(path, name string) *Package {
    	scope := NewScope(Universe, nopos, nopos, fmt.Sprintf("package %q", path))
    	return &Package{path: path, name: name, scope: scope}
    }
    
    // Path returns the package path.
    func (pkg *Package) Path() string { return pkg.path }
    
    // Name returns the package name.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 06 13:09:19 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/api_predicates.go

    		return false
    	}
    	return (*Checker)(nil).implements(nopos, V, T, false, nil)
    }
    
    // Satisfies reports whether type V satisfies the constraint T.
    //
    // The behavior of Satisfies is unspecified if V is Typ[Invalid] or an uninstantiated
    // generic type.
    func Satisfies(V Type, T *Interface) bool {
    	return (*Checker)(nil).implements(nopos, V, T, true, nil)
    }
    
    // Identical reports whether x and y are identical types.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 08 16:36:08 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top