Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for shortVarDecls1 (0.21 sec)

  1. src/internal/types/testdata/check/stmt0.go

    	_ = a
    	a, b, b /* ERROR "b repeated on left side of :=" */ := 1, 2, 3
    	_ = b
    	c, c /* ERROR "c repeated on left side of :=" */, b := 1, 2, 3
    	_ = c
    	a, b := /* ERROR "no new variables" */ 1, 2
    }
    
    func shortVarDecls1() {
    	const c = 0
    	type d int
    	a, b, c /* ERROR "cannot assign" */ , d /* ERROR "cannot assign" */  := 1, "zwei", 3.0, 4
    	var _ int = a // a is of type int
    	var _ string = b // b is of type string
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 19K bytes
    - Viewed (0)
Back to top