Skip to content

Commit f0dbb8b

Browse files
author
svorenova
committed
Use can_cast instead of direct id check
1 parent 1a30dee commit f0dbb8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/util/type_eq.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ bool type_eq(const typet &type1, const typet &type2, const namespacet &ns)
3232
if(type1==type2)
3333
return true;
3434

35-
if(type1.id() == ID_symbol_type)
35+
if(can_cast_type<symbol_typet>(type1))
3636
{
3737
const symbolt &symbol = ns.lookup(to_symbol_type(type1));
3838
if(!symbol.is_type)
@@ -41,7 +41,7 @@ bool type_eq(const typet &type1, const typet &type2, const namespacet &ns)
4141
return type_eq(symbol.type, type2, ns);
4242
}
4343

44-
if(type2.id() == ID_symbol_type)
44+
if(can_cast_type<symbol_typet>(type2))
4545
{
4646
const symbolt &symbol = ns.lookup(to_symbol_type(type2));
4747
if(!symbol.is_type)

0 commit comments

Comments
 (0)