diff -r c0740249963c -r b01ee7446984 src/SemanticAnalysis.cpp --- a/src/SemanticAnalysis.cpp Sat Aug 04 20:12:20 2012 -0700 +++ b/src/SemanticAnalysis.cpp Sat Aug 04 21:06:47 2012 -0700 @@ -1055,7 +1055,15 @@ return true; } - if (given->isEnum() || given->isFunction()) { + if (actual->isStruct()) { + if (!given->isStruct() || actual != given) { + typeMismatch(node, actual, given); + return false; + } + return true; + } + + if (given->isEnum() || given->isFunction() || given->isStruct()) { typeMismatch(node, actual, given); return false; }