diff options
-rw-r--r-- | ast_to_hir.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index b150ba3690..251845acd9 100644 --- a/ast_to_hir.cpp +++ b/ast_to_hir.cpp @@ -1864,7 +1864,14 @@ ast_function::hir(exec_list *instructions, iter_b.next(); } - /* FINISHME: Compare return types. */ + if (sig->return_type != return_type) { + YYLTYPE loc = this->get_location(); + + _mesa_glsl_error(& loc, state, + "function `%s' return type doesn't match " + "prototype", + name); + } if (is_definition && (sig->definition != NULL)) { YYLTYPE loc = this->get_location(); |