Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(72)

Unified Diff: mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl

Issue 396063006: Mojo: Always suffix int literals with L in generated Java bindings. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: -1L Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
diff --git a/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl b/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
index d72bd7ff4a701791e596f4291aad3dfde1fe9478..7273287b6567a37e6652d120d030a0e07522957f 100644
--- a/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
+++ b/mojo/public/tools/bindings/generators/java_templates/enum_definition.tmpl
@@ -1,6 +1,6 @@
{%- macro enum_value(enum, field, index) -%}
{%- if field.value -%}
-(int) ({{field.value|expression_to_text}})
+(int) ({{field.value|expression_to_text('i32')}})
{%- elif index == 0 -%}
0
{%- else -%}

Powered by Google App Engine
This is Rietveld 408576698