Merge pull request #2772 from JakubValtar/preproc-constructorCast-fix

Fixes #1936 - Preproc constructor cast fix
This commit is contained in:
Ben Fry
2014-08-12 09:25:32 -04:00
5 changed files with 40 additions and 4 deletions

View File

@@ -194,13 +194,14 @@ constructorCast!
// if this is a string literal, make sure the type we're trying to cast
// to is one of the supported ones
//
{ #e.getType() != STRING_LITERAL ||
( #t.getType() == LITERAL_byte ||
{ (#e == null) ||
( (#e.getType() != STRING_LITERAL) ||
( #t.getType() == LITERAL_boolean ||
#t.getType() == LITERAL_double ||
#t.getType() == LITERAL_float ||
#t.getType() == LITERAL_int ||
#t.getType() == LITERAL_long ||
#t.getType() == LITERAL_short ) }?
#t.getType() == LITERAL_short )) }?
// create the node
//
{#constructorCast = #(#[CONSTRUCTOR_CAST,"CONSTRUCTOR_CAST"], t, e);}