[vala] dova: Fix typing of character literals



commit 37d80177da6ab12eaeceaac1b5811ac0586d9f9f
Author: Jürg Billeter <j bitron ch>
Date:   Wed Jun 30 18:41:58 2010 +0200

    dova: Fix typing of character literals

 vala/valacharacterliteral.vala |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/vala/valacharacterliteral.vala b/vala/valacharacterliteral.vala
index 3d858b4..c69eeb5 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;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]