tokiwa-software / fuzion

The Fuzion Language Implementation
https://fuzion-lang.dev
GNU General Public License v3.0
45 stars 9 forks source link

ast: fix unjustified "Block must end with a result expression" #3271

Closed michaellilltokiwa closed 3 days ago

michaellilltokiwa commented 3 days ago

logic was slightly too strict, change from r.resultType().compareTo(Types.resolved.t_unit) != 0 to !r.resultType().isAssignableFrom(Types.resolved.t_unit)

fixes #3233