仓颉match case报错

参考:https://txwtech.blog.csdn.net/article/details/140757790 

error: non-exhaustive patterns
==> a.cj:7:14:
| 
7 |  match(b){
|  ^ the selector is of type 'Int64'
| 
# note: _ is not covered

error: cannot assign to immutable value
==> a.cj:8:19:
| 
8 |  case 77=> a = 'a77'
|  ^^^^^^^^^ 
| 
note: variable 'a' is immutable
==> a.cj:5:9:
| 
5 |  let a = 'Hello World!'//不可变量
|  ^ 
| 

error: cannot assign to immutable value
==> a.cj:10:19:
| 
10 |  case 78=> a = 'a78'
|  ^^^^^^^^^ 
| 
note: variable 'a' is immutable
==> a.cj:5:9:
| 
5 |  let a = 'Hello World!'//不可变量
|  ^ 
| 

3 errors generated, 3 errors printed.

posted @ 2024-07-28 22:22  txwtech  阅读(3)  评论(0编辑  收藏  举报