aboutsummaryrefslogtreecommitdiff
path: root/content/constants/string2.go
blob: 362b4841d0a985b95a085e165ec2d86b2c5da857 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// +build OMIT

package main

import "fmt"

const typedHello string = "Hello, 世界"

func main() {
	// START OMIT
	type MyString string
	var m MyString
	m = typedHello // Type error
	fmt.Println(m)
	// STOP OMIT
}