Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 136 for typecheck (0.36 sec)

  1. src/go/types/issues_test.go

    	const src = `
    package p
    
    func f[T any]() {}
    func _()        { f() }
    `
    	// no error handler provided (this issue)
    	var conf Config
    	typecheck(src, &conf, nil) // must not panic
    
    	// with error handler (sanity check)
    	conf.Error = func(error) {}
    	typecheck(src, &conf, nil) // must not panic
    }
    
    func TestIssue63260(t *testing.T) {
    	const src = `
    package p
    
    func _() {
            use(f[*string])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/iimport.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    // Indexed package import.
    // See iexport.go for the export data format.
    
    package typecheck
    
    import (
    	"cmd/compile/internal/base"
    	"cmd/compile/internal/ir"
    	"cmd/compile/internal/types"
    )
    
    // HaveInlineBody reports whether we have fn's inline body available
    // for inlining.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jan 26 21:52:50 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/issues_test.go

    	const src = `
    package p
    
    func f[T any]() {}
    func _()        { f() }
    `
    	// no error handler provided (this issue)
    	var conf Config
    	typecheck(src, &conf, nil) // must not panic
    
    	// with error handler (sanity check)
    	conf.Error = func(error) {}
    	typecheck(src, &conf, nil) // must not panic
    }
    
    func TestIssue63260(t *testing.T) {
    	const src = `
    package p
    
    func _() {
            use(f[*string])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 28.1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/walk/stmt.go

    		ir.OCLOSE,
    		ir.OCOPY,
    		ir.OCALLINTER,
    		ir.OCALL,
    		ir.OCALLFUNC,
    		ir.ODELETE,
    		ir.OSEND,
    		ir.OPRINT,
    		ir.OPRINTLN,
    		ir.OPANIC,
    		ir.ORECOVERFP,
    		ir.OGETG:
    		if n.Typecheck() == 0 {
    			base.Fatalf("missing typecheck: %+v", n)
    		}
    
    		init := ir.TakeInit(n)
    		n = walkExpr(n, &init)
    		if n.Op() == ir.ONAME {
    			// copy rewrote to a statement list and a temp for the length.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 15:42:30 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  5. src/go/types/stdlib_test.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.
    
    // This file tests types.Check by using it to
    // typecheck the standard library and tests.
    
    package types_test
    
    import (
    	"errors"
    	"fmt"
    	"go/ast"
    	"go/build"
    	"go/importer"
    	"go/parser"
    	"go/scanner"
    	"go/token"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 19 04:39:56 UTC 2023
    - 13.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/stdlib_test.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.
    
    // This file tests types2.Check by using it to
    // typecheck the standard library and tests.
    
    package types2_test
    
    import (
    	"bytes"
    	"cmd/compile/internal/syntax"
    	"errors"
    	"fmt"
    	"go/build"
    	"internal/testenv"
    	"os"
    	"path/filepath"
    	"runtime"
    	"strings"
    	"sync"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:18:33 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/dcl.go

    // Copyright 2009 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 typecheck
    
    import (
    	"fmt"
    	"sync"
    
    	"cmd/compile/internal/base"
    	"cmd/compile/internal/ir"
    	"cmd/compile/internal/types"
    	"cmd/internal/src"
    )
    
    var funcStack []*ir.Func // stack of previous values of ir.CurFunc
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:15:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/mono_test.go

    	src := "package x; import `unsafe`; var _ unsafe.Pointer;\n" + body
    
    	var buf strings.Builder
    	conf := types2.Config{
    		Error:    func(err error) { fmt.Fprintln(&buf, err) },
    		Importer: defaultImporter(),
    	}
    	typecheck(src, &conf, nil)
    	if buf.Len() == 0 {
    		return nil
    	}
    	return errors.New(strings.TrimRight(buf.String(), "\n"))
    }
    
    func TestMonoGood(t *testing.T) {
    	for i, good := range goods {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 2.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ir/mini.go

    func (n *miniNode) SetEsc(x uint16)   { n.esc = x }
    
    const (
    	miniTypecheckShift = 0
    	miniWalked         = 1 << 2 // to prevent/catch re-walking
    )
    
    func (n *miniNode) Typecheck() uint8 { return n.bits.get2(miniTypecheckShift) }
    func (n *miniNode) SetTypecheck(x uint8) {
    	if x > 2 {
    		panic(fmt.Sprintf("cannot SetTypecheck %d", x))
    	}
    	n.bits.set2(miniTypecheckShift, x)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Aug 31 22:09:44 UTC 2022
    - 2.8K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/typecheck/expr.go

    		base.Fatalf("len for OSTRINGHEADER must be non-negative")
    	}
    
    	return n
    }
    
    // tcStar typechecks an ODEREF node, which may be an expression or a type.
    func tcStar(n *ir.StarExpr, top int) ir.Node {
    	n.X = typecheck(n.X, ctxExpr|ctxType)
    	l := n.X
    	t := l.Type()
    	if t == nil {
    		n.SetType(nil)
    		return n
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
Back to top