Skip to content

Commit f36fd18

Browse files
mazi233mazi
andauthored
修正枚举字面量使用错误 (#262)
Co-authored-by: mazi <[email protected]>
1 parent e85297c commit f36fd18

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

course/.DS_Store

6 KB
Binary file not shown.

course/code/14/enum.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ const EnumLiteral_ = struct {
149149
// #region enum_literal
150150
// 使用内建函数 @Type 构造出一个 EnumLiteral 类型
151151
// 这是目前官方文档中的使用方案
152-
const EnumLiteral: type = @Type(.EnumLiteral);
152+
const EnumLiteral: type = @Type(.enum_literal);
153153

154154
// 定义一个常量 enum_literal,它的类型为 EnumLiteral,并赋值为 “.kkk”
155155
const enum_literal: EnumLiteral = .kkk;

0 commit comments

Comments
 (0)