diff --git a/std/jule/sema/eval.jule b/std/jule/sema/eval.jule index a15d34537..c57ad6d12 100644 --- a/std/jule/sema/eval.jule +++ b/std/jule/sema/eval.jule @@ -690,23 +690,24 @@ impl Eval { ta.used = true let mut kind = ta.kind.kind.kind + let mut d: &Data = nil match type kind { | &StructIns: - ret self.__eval_struct((&StructIns)(kind)) + d = self.__eval_struct((&StructIns)(kind)) | &Enum: - ret self.__eval_enum((&Enum)(kind)) + d = self.__eval_enum((&Enum)(kind)) |: - let mut d = &Data{ + d = &Data{ decl: true, kind: &TypeKind{ - generic: ta.generic, cpp_ident: if ta.cpp_linked { ta.ident } else { ta.kind.kind.cpp_ident }, kind: ta.kind.kind.kind, }, } d.model = d.kind - ret d } + d.kind.generic = ta.generic + ret d } fn eval_def(mut self, mut def: any, ident: Token): &Data { diff --git a/std/jule/sema/scope.jule b/std/jule/sema/scope.jule index 15dad8dce..c6d8a36dc 100644 --- a/std/jule/sema/scope.jule +++ b/std/jule/sema/scope.jule @@ -1457,7 +1457,7 @@ impl ScopeChecker { let mut d = eval.eval_expr_kind(e.kind) if d == nil { continue - } + } if m.type_match { _case.exprs = append(_case.exprs, d) if count_match_type(m, d.kind) > 1 { diff --git a/std/jule/sema/sema.jule b/std/jule/sema/sema.jule index a25b69427..ed189904e 100644 --- a/std/jule/sema/sema.jule +++ b/std/jule/sema/sema.jule @@ -179,7 +179,9 @@ fn build_generic_type_aliases(mut &f: &FnIns): []&TypeAlias { scope: f.decl.scope, ident: decl.ident, token: decl.token, - kind: &TypeSymbol{kind: g}, + kind: &TypeSymbol{ + kind: g, + }, }) } @@ -193,7 +195,9 @@ fn build_generic_type_aliases(mut &f: &FnIns): []&TypeAlias { scope: f.decl.scope, ident: decl.ident, token: decl.token, - kind: &TypeSymbol{kind: g}, + kind: &TypeSymbol{ + kind: g, + }, }) } }