From: Jürg Billeter Date: Wed, 30 Jun 2010 16:41:58 +0000 (+0200) Subject: dova: Fix typing of character literals X-Git-Tag: 0.9.3~53 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=37d80177da6ab12eaeceaac1b5811ac0586d9f9f;p=thirdparty%2Fvala.git dova: Fix typing of character literals --- diff --git a/vala/valacharacterliteral.vala b/vala/valacharacterliteral.vala index 3d858b4ec..c69eeb5e4 100644 --- a/vala/valacharacterliteral.vala +++ b/vala/valacharacterliteral.vala @@ -1,6 +1,7 @@ /* valacharacterliteral.vala * - * Copyright (C) 2006-2009 Jürg Billeter, Raffaele Sandrini + * Copyright (C) 2006-2010 Jürg Billeter + * Copyright (C) 2006-2009 Raffaele Sandrini * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -89,10 +90,14 @@ public class Vala.CharacterLiteral : Literal { checked = true; - if (get_char () < 128) { - value_type = new IntegerType ((Struct) analyzer.root_symbol.scope.lookup ("char")); + if (analyzer.context.profile == Profile.DOVA) { + value_type = new IntegerType ((Struct) analyzer.root_symbol.scope.lookup ("char"), get_char ().to_string (), "int"); } else { - value_type = new IntegerType ((Struct) analyzer.root_symbol.scope.lookup ("unichar")); + if (get_char () < 128) { + value_type = new IntegerType ((Struct) analyzer.root_symbol.scope.lookup ("char")); + } else { + value_type = new IntegerType ((Struct) analyzer.root_symbol.scope.lookup ("unichar")); + } } return !error;