WTF-Solidity
WTF-Solidity copied to clipboard
关于第六讲
📝 Details(细节)
原文:因为在Solidity中,如果一个值没有指定type的话,默认就是最小单位的该type,这里 uint 的默认最小单位类型就是uint8。
勘误:unit的默认类型应该是uint256。int的默认类型是int256。
🔢 Reference(参考) 参考:https://docs.soliditylang.org/zh/latest/types.html#integers
ps.确认需要修复的话,可以提任务给我。
这里的确表达有误,应该改为文档相应的部分
In the example below, the type of [1, 2, 3] is uint8[3] memory, because the type of each of these constants is uint8. If you want the result to be a uint[3] memory type, you need to convert the first element to uint.
欢迎提pr。 https://docs.soliditylang.org/en/latest/types.html#array-literals
I will fix it.
@flandre-crimson 大佬 问题已经修复 有空可以关闭一下issue 谢谢
@AmazingAng 问题已经修复 有空可以关闭一下issue