diff options
author | David Robillard <d@drobilla.net> | 2011-01-09 04:16:36 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-09 04:16:36 +0000 |
commit | 95f95b258ba6b6ddec3a1bd933815a124bebb8c2 (patch) | |
tree | fab3c9c889d6502778b2955ead40241fa8c59ba1 /src | |
parent | 9bf97f9ed8cca131284c214909c2730bdb3b96b1 (diff) | |
download | resp-95f95b258ba6b6ddec3a1bd933815a124bebb8c2.tar.gz resp-95f95b258ba6b6ddec3a1bd933815a124bebb8c2.tar.bz2 resp-95f95b258ba6b6ddec3a1bd933815a124bebb8c2.zip |
Don't access type stuff when type annotations are not requested.
git-svn-id: http://svn.drobilla.net/resp/trunk@403 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src')
-rw-r--r-- | src/pprint.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pprint.cpp b/src/pprint.cpp index be0a840..dd42d8b 100644 --- a/src/pprint.cpp +++ b/src/pprint.cpp @@ -177,7 +177,7 @@ print_to(ostream& out, const AST* ast, unsigned indent, CEnv* cenv, bool types) // Print prototype (possibly with parameter type annotations) const ATuple* pat = (*i++)->as_tuple(); out << "("; - const ATuple* type = cenv->type(tup)->to_tuple(); + const ATuple* type = types ? cenv->type(tup)->to_tuple() : NULL; const ATuple* protT = type ? type->prot() : NULL; print_list_one_line(out, pat, pat->begin(), indent + 2, cenv, types, protT); |