Skip to content

Commit

Permalink
sema: add missing support of type enums for assertion casting statements
Browse files Browse the repository at this point in the history
  • Loading branch information
mertcandav committed Jan 24, 2025
1 parent 10e7ed3 commit ecf8275
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion std/jule/sema/scope.jule
Original file line number Diff line number Diff line change
Expand Up @@ -1419,7 +1419,7 @@ impl scopeChecker {
| &CastingExpr:
mut ce := (&CastingExpr)(right[0].data.Model)
prim := ce.Expr.Type.Prim()
if prim != nil && prim.IsAny() || ce.Expr.Type.Trait() != nil {
if prim != nil && prim.IsAny() || ce.Expr.Type.TypeEnum() != nil || ce.Expr.Type.Trait() != nil {
strict = true
right = [
{&Value{Mutable: right[0].data.Mutable, Type: ce.Type}, right[0].expr},
Expand Down

0 comments on commit ecf8275

Please sign in to comment.