From 941a8303ec105e2a8e2573b05120b415d7b10dd9 Mon Sep 17 00:00:00 2001 From: mertcandav Date: Wed, 21 Aug 2024 10:36:04 +0300 Subject: [PATCH] compiler: minor improvement for boundary type analysis --- src/julec/opt/boundary.jule | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/julec/opt/boundary.jule b/src/julec/opt/boundary.jule index cb6cd558c..82ddd31c4 100644 --- a/src/julec/opt/boundary.jule +++ b/src/julec/opt/boundary.jule @@ -163,7 +163,7 @@ fn possibleBoundaryRemove(mut &b: &boundary, model: ExprModel) { } fn isBoundaryRiskyType(mut t: &TypeKind): bool { ret t.Sptr() != nil } -fn isBoundaryValidType(mut t: &TypeKind): bool { ret t.Ptr() == nil } +fn isBoundaryValidType(mut t: &TypeKind): bool { ret t.Slc() != nil || t.Arr() != nil } fn getBoundaryVar(m: ExprModel): uintptr { if !Access {