-
-
Save brgnepal/22a3c02a68d76038601a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type myInt int | |
const unTypedC = 20 | |
const typedC int = 30 | |
func main() { | |
var typedInt int | |
var c myInt | |
typedInt = 10 | |
impliedInt := 40 | |
c = 20 | |
impliedInt = c //Won't Work | |
c = typedInt //Won't work | |
c = unTypedC | |
c = typedC // Won't work | |
fmt.Println(c, typedInt, impliedInt) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment