X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fglsl%2Fvalidate.cpp;h=e6f0c653e45f4ad9e62c108084867dc4374c11c9;hb=d80750e7c20ea061f210b756196cc844b762b852;hp=8e5e996cb1f430ce1fe7c4103807c31a96f60a33;hpb=7c7a32e0de7fd8c16c02190a7483a0c2411973c1;p=libs%2Fgl.git diff --git a/source/glsl/validate.cpp b/source/glsl/validate.cpp index 8e5e996c..e6f0c653 100644 --- a/source/glsl/validate.cpp +++ b/source/glsl/validate.cpp @@ -201,6 +201,13 @@ void ReferenceValidator::visit(VariableDeclaration &var) TraversingVisitor::visit(var); } +void ReferenceValidator::visit(FunctionDeclaration &func) +{ + if(!func.return_type_declaration) + error(func, format("Use of undeclared type '%s'", func.return_type)); + TraversingVisitor::visit(func); +} + } // namespace SL } // namespace GL } // namespace Msp