Search Options

Results per page
Sort
Preferred Languages
Advance

Results 31 - 40 of 529 for isLegal (0.11 sec)

  1. test/fixedbugs/bug056.go

    // license that can be found in the LICENSE file.
    
    package main
    
    func frexp() (a int, b float64) {
    	return 1, 2.0
    }
    
    func main() {
    	a, b := frexp();
    	_, _ = a, b;
    }
    
    /*
    bug056.go:8: illegal types for operand: AS
    	(<int32>INT32)
    	(<int32>INT32)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:49:30 UTC 2012
    - 364 bytes
    - Viewed (0)
  2. test/func4.go

    // errorcheck
    
    // 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.
    
    // Verify that it is illegal to take the address of a function.
    // Does not compile.
    
    package main
    
    var notmain func()
    
    func main() {
    	var x = &main		// ERROR "address of|invalid"
    	main = notmain	// ERROR "assign to|invalid"
    	_ = x
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 03:28:53 UTC 2012
    - 409 bytes
    - Viewed (0)
  3. test/func3.go

    // errorcheck
    
    // 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.
    
    // Verify that illegal function signatures are detected.
    // Does not compile.
    
    package main
    
    type t1 int
    type t2 int
    type t3 int
    
    func f1(*t2, x t3)	// ERROR "named"
    func f2(t1, *t2, x t3)	// ERROR "named"
    func f3() (x int, *string)	// ERROR "named"
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 03:28:53 UTC 2012
    - 505 bytes
    - Viewed (0)
  4. test/fixedbugs/bug062.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 main
    
    func main() {
    	var _ string = nil // ERROR "illegal|invalid|incompatible|cannot"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 28 14:28:33 UTC 2023
    - 272 bytes
    - Viewed (0)
  5. test/fixedbugs/issue7996.go

    // compile
    
    // Copyright 2014 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.
    
    // /tmp/x.go:5: illegal constant expression: bool == interface {}
    
    package p
    
    var m = map[interface{}]struct{}{
    	nil:  {},
    	true: {},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 308 bytes
    - Viewed (0)
  6. test/fixedbugs/bug088.dir/bug1.go

    	_, _, _, _ = a0, a1, a2, b2;
    }
    
    /*
    uetli:~/Source/go1/test/bugs/bug088.dir gri$ 6g bug0.go && 6g bug1.go
    bug1.go:8: shape error across :=
    bug1.go:8: a2: undefined
    bug1.go:8: b2: undefined
    bug1.go:8: illegal types for operand: AS
    	(<(bug0)P.int32>INT32)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 550 bytes
    - Viewed (0)
  7. test/fixedbugs/bug322.dir/main.go

    type I interface {
    	M()
    }
    
    type PI interface {
    	PM()
    }
    
    func main() {
    	var t lib.T
    	t.M()
    	t.PM()
    
    	// This is still an error.
    	// var i1 I = t
    	// i1.M()
    	
    	// This combination is illegal because
    	// PM requires a pointer receiver.
    	// var pi1 PI = t
    	// pi1.PM()
    
    	var pt = &t
    	pt.M()
    	pt.PM()
    
    	var i2 I = pt
    	i2.M()
    
    	var pi2 PI = pt
    	pi2.PM()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 24 23:48:19 UTC 2011
    - 540 bytes
    - Viewed (0)
  8. test/char_lit1.go

    // errorcheck -d=panic
    
    // 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.
    
    // Verify that illegal character literals are detected.
    // Does not compile.
    
    package main
    
    const (
    	// check that surrogate pair elements are invalid
    	// (d800-dbff, dc00-dfff).
    	_ = '\ud7ff' // ok
    	_ = '\ud800'  // ERROR "Unicode|unicode"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 05 18:46:43 UTC 2021
    - 822 bytes
    - Viewed (0)
  9. test/convert3.go

    var d1 chan<- int = c
    var d2 = (chan<- int)(c)
    
    var e *[4]int
    var f1 []int = e[0:]
    var f2 = []int(e[0:])
    
    var g = []int(nil)
    
    type H []int
    type J []int
    
    var h H
    var j1 J = h // ERROR "compat|illegal|cannot"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Feb 19 02:19:43 UTC 2012
    - 544 bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tfrt/tests/tf_to_corert/errors.mlir

    // RUN: tf-tfrt-opt -tf-to-tfrt %s -split-input-file -verify-diagnostics
    
    // expected-error @+1 {{failed to legalize operation 'func.func' that was explicitly marked illegal}}
    func.func @test_identity_wrong_type(%arg0: tensor<4x2x!tf_type.string>) -> tensor<4x2x!tf_type.stringref> {
      %0 = "tf.SomeOp"(%arg0) : (tensor<4x2x!tf_type.string>) -> tensor<4x2x!tf_type.stringref>
      func.return %0 : tensor<4x2x!tf_type.stringref>
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Fri Mar 25 10:51:48 UTC 2022
    - 428 bytes
    - Viewed (0)
Back to top