Skip to content

Commit

Permalink
change string comparison to type comparison
Browse files Browse the repository at this point in the history
Signed-off-by: arezaii <ahmad.rezaii@hpe.com>
  • Loading branch information
arezaii committed Nov 28, 2022
1 parent 6d3d5c8 commit 2d239f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/internal/ChapelBase.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ module ChapelBase {
// string to a type. Otherwise, we can't resolve chpl_debug_writeln in
// `range.these`
{ var dummyRange = 1..0; for i in dummyRange {} }
if t:string == "regex(string)" || t:string == "regex(bytes)" then
if t == regex(string) || t == regex(bytes) then
return compile(str);
else
return str:t;
Expand Down

0 comments on commit 2d239f5

Please sign in to comment.