Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 135 for I2 (0.02 sec)

  1. test/interface/embed3.dir/embed1.go

    	var i2 interface{} = X2{}
    	check(func() { _ = i2.(p.I2) }, "interface conversion: main.X2 is not p.I2: missing method foo")
    
    	var i3 interface{} = X3{}
    	check(func() { _ = i3.(p.I2) }, "interface conversion: main.X3 is not p.I2: missing method foo")
    
    	var i4 interface{} = X4{}
    	check(func() { _ = i4.(p.I2) }, "interface conversion: main.X4 is not p.I2: missing method foo")
    
    	var i5 interface{} = X5{}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Nov 06 09:09:59 UTC 2019
    - 1.6K bytes
    - Viewed (0)
  2. test/ken/interfun.go

    	i1 = s;		// convert S to I1
    	i2 = i1.(I2);	// convert I1 to I2
    
    	// call interface
    	if i1.f() != 5 { panic(21); }
    	if i2.f() != 5 { panic(22); }
    	if i2.g() != 6 { panic(23); }
    
    	g = i1.(*S);		// convert I1 to S
    	if g != s { panic(31); }
    
    	g = i2.(*S);		// convert I2 to S
    	if g != s { panic(32); }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 872 bytes
    - Viewed (0)
  3. src/internal/types/testdata/check/issues0.go

    	i1 = t2 /* ERRORx `.* t2 .* as I1 .*: \*T2 does not implement I1 \(wrong type for method foo\)\n\t\thave foo\(int\)\n\t\twant foo\(\)` */
    	i2 = i1 /* ERRORx `.* i1 .* as I2 .*: I1 does not implement I2 \(wrong type for method foo\)\n\t\thave foo\(\)\n\t\twant foo\(int\)` */
    	i2 = t1 /* ERRORx `.* t1 .* as I2 .*: \*T1 does not implement I2 \(wrong type for method foo\)\n\t\thave foo\(\)\n\t\twant foo\(int\)` */
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Feb 05 18:13:11 UTC 2024
    - 11.6K bytes
    - Viewed (0)
  4. src/internal/types/testdata/check/conversions0.go

    	type I1 interface{
    		m1()
    	}
    
    	type I2 interface{
    		m1()
    		m2(x int)
    	}
    
    	type I3 interface{
    		m1()
    		m2() int
    	}
    
    	var e E
    	var i1 I1
    	var i2 I2
    	var i3 I3
    
    	_ = E(0)
    	_ = E(nil)
    	_ = E(e)
    	_ = E(i1)
    	_ = E(i2)
    
    	_ = I1(0 /* ERROR "cannot convert" */ )
    	_ = I1(nil)
    	_ = I1(i1)
    	_ = I1(e /* ERROR "cannot convert" */ )
    	_ = I1(i2)
    
    	_ = I2(nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 02:58:32 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  5. test/fixedbugs/bug251.go

    // license that can be found in the LICENSE file.
    
    package main
    
    type I1 interface { // GC_ERROR "invalid recursive type"
    	m() I2
    	I2
    }
    
    type I2 interface {
    	I1 // GCCGO_ERROR "loop|interface"
    }
    
    
    var i1 I1 = i2
    var i2 I2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Dec 15 21:45:05 UTC 2020
    - 362 bytes
    - Viewed (0)
  6. test/fixedbugs/bug089.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package main
    
    type	I1	interface {}
    type	I2	interface { pr() }
    
    func	e()	I1;
    
    var	i1	I1;
    var	i2	I2;
    
    func
    main() {
    
    	i2 = e().(I2);	// bug089.go:16: fatal error: agen_inter i2i
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 17 04:49:30 UTC 2012
    - 350 bytes
    - Viewed (0)
  7. test/interface/recursive1.dir/recursive2.go

    // intact and with the same meaning, by assigning to or using them.
    
    package main
    
    import "./recursive1"
    
    func main() {
    	var i1 p.I1
    	var i2 p.I2
    	i1 = i2
    	i2 = i1
    	i1 = i2.F()
    	i2 = i1.F()
    	_, _ = i1, i2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 434 bytes
    - Viewed (0)
  8. test/method4.dir/prog.go

    	eq(I1.Sum(t1, a, 11), 21)
    	eq(I1.Sum(t2, a, 12), 22)
    
    	f3 := I1.Sum
    	eq(f3(t1, a, 13), 23)
    	eq(f3(t2, a, 14), 24)
    
    	eq(I2.Sum(t1, a, 15), 25)
    	eq(I2.Sum(t2, a, 16), 26)
    
    	f4 := I2.Sum
    	eq(f4(t1, a, 17), 27)
    	eq(f4(t2, a, 18), 28)
    
    	// issue 6723
    	f5 := (interface {
    		I2
    	}).Sum
    	eq(f5(t1, a, 19), 29)
    	eq(f5(t2, a, 20), 30)
    
    	mt1 := method4a.T1(4)
    	mt2 := &method4a.T2{4}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 07 12:26:48 UTC 2014
    - 1.7K bytes
    - Viewed (0)
  9. test/typeparam/issue48191.go

    			m0 map[G2]byte
    			s1 G3
    		}{((18+i2)&^i2%i2 ^ i) / i: m3[(G2(267.1)*G2(i1) > G2(i2) || (false || true || (true || false))) && func(int32, int64) bool {
    			return <-ch0
    		}(int32(63), ai64_2[61&^i1&i2])][i|i^i1]}
    		i2 = 90 - i1
    		_, _, _, _, _, _, _, _ = f0, pf2, ch5, ch6, fnc0, m7, ch7, fnc1
    	} else {
    		var m7 map[G1]chan uint
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 01 19:45:34 UTC 2022
    - 9.7K bytes
    - Viewed (0)
  10. test/fixedbugs/bug250.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package bug250
    
    type I1 interface {
    	m() I2
    }
    
    type I2 interface {
    	I1
    }
    
    var i1 I1 = i2
    var i2 I2
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 287 bytes
    - Viewed (0)
Back to top