QmlJS: Convert more dynamic_casts to value_casts.

And introduce a good error message for the case when someone
forgets the specialization of the value_cast template.

Change-Id: Iec55a839e8f5eef5872b1dab8601f66e0e0c88de
Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
This commit is contained in:
Christian Kamm
2011-10-12 11:37:58 +02:00
parent 0e8657107c
commit 9abf0e6a9a
3 changed files with 28 additions and 3 deletions

View File

@@ -704,6 +704,11 @@ const ASTPropertyReference *Value::asAstPropertyReference() const
return 0;
}
const ASTSignal *Value::asAstSignal() const
{
return 0;
}
////////////////////////////////////////////////////////////////////////////////
// Values
////////////////////////////////////////////////////////////////////////////////
@@ -1982,6 +1987,11 @@ ASTSignal::~ASTSignal()
{
}
const ASTSignal *ASTSignal::asAstSignal() const
{
return this;
}
int ASTSignal::argumentCount() const
{
int count = 0;