Why is it possible to convert a non-constant value x to type T when x is NOT assignable to T?

前端 未结 0 1297
终归单人心
终归单人心 2021-01-14 05:14

According to Go spec a non-constant value x can be converted to type T if x is assignable to T (first rule out of 7).

Given the following 2 codes:

  1. succes
相关标签:
回答
  • 消灭零回复
提交回复
热议问题