type Boolean bool
func takes_bool(b bool) {
fmt.Printf("%t\n", b)
}
func takes_boolean(b Boolean) {
fmt.Printf("%t\n", b)
}
When I invoke the following:
takes_bool(Boolean(false))
takes_bool(Boolean(true))
I get:
cannot use Boolean(false) (type Boolean) as type bool in function argument
cannot use Boolean(true) (type Boolean) as type bool in function argument
The rules on assignability seems to NOT disallow it i.e. at least one is not a named type & both have the same underlying type:
type Boolean bool
vs
bool