From 37d80177da6ab12eaeceaac1b5811ac0586d9f9f Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrg=20Billeter?= Date: Wed, 30 Jun 2010 18:41:58 +0200 Subject: [PATCH] dova: Fix typing of character literals --- vala/valacharacterliteral.vala | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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; -- 2.47.3