diff options
Diffstat (limited to 'elaborate.cxx')
-rw-r--r-- | elaborate.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/elaborate.cxx b/elaborate.cxx index 04eb1fa2..be0cfcec 100644 --- a/elaborate.cxx +++ b/elaborate.cxx @@ -2700,11 +2700,18 @@ typeresolution_info::invalid (const token* tok, exp_type pe) string nm = (current_function ? current_function->name : current_probe ? current_probe->name : "?"); - cerr << "semantic error: " + nm + " with invalid type " << pe << " for "; - if (tok) - cerr << *tok; + if (tok && tok->type == tok_operator) + { + cerr << "semantic error: " + nm + " uses invalid " << *tok; + } else - cerr << "a token"; + { + cerr << "semantic error: " + nm + " with invalid type " << pe << " for "; + if (tok) + cerr << *tok; + else + cerr << "a token"; + } cerr << endl; } } |