c3lang / c3c

Compiler for the C3 language
https://c3-lang.org
GNU Lesser General Public License v3.0
3.01k stars 184 forks source link

add check for to_string in is_struct_with_default_print #1640

Closed ellipse12 closed 2 days ago

ellipse12 commented 2 days ago

The function wasn't checking if the struct had the method to_string which caused a segfault when trying to override the default to_string on a struct

lerno commented 2 days ago

Thank you!