]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
dova: Fix typing of character literals
authorJürg Billeter <j@bitron.ch>
Wed, 30 Jun 2010 16:41:58 +0000 (18:41 +0200)
committerJürg Billeter <j@bitron.ch>
Wed, 30 Jun 2010 16:41:58 +0000 (18:41 +0200)
vala/valacharacterliteral.vala

index 3d858b4ecc0d1783d9d341ae255c24b9de2ac11c..c69eeb5e4825779310aaa69039f1e059b430d553 100644 (file)
@@ -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;