Skip to content

Commit

Permalink
Fix Command#report_warnings to gracefully handle missing Compiler#pro…
Browse files Browse the repository at this point in the history
…gram (#9866)
  • Loading branch information
straight-shoota authored Nov 10, 2020
1 parent 1d40bc9 commit f3d36a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/compiler/crystal/semantic/warnings.cr
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ module Crystal
compiler = @compiler
return unless compiler

program = compiler.program
program = compiler.program?
return unless program
return if program.warning_failures.empty?

program.warning_failures.each do |message|
Expand Down

0 comments on commit f3d36a6

Please sign in to comment.