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

Unified Diff: sky/engine/bindings/scripts/dart_types.py

Issue 981733009: Fix all dartanalyzer errors in dart:sky except the Native ones. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « sky/engine/bindings/scripts/compiler.py ('k') | sky/engine/bindings/scripts/templates/dart_blink.template » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/bindings/scripts/dart_types.py
diff --git a/sky/engine/bindings/scripts/dart_types.py b/sky/engine/bindings/scripts/dart_types.py
index a4e205caebfc48b78dc028c8904fb7195784bb57..c58ad59e62bf626e9c4464473dae41f90a5d768f 100644
--- a/sky/engine/bindings/scripts/dart_types.py
+++ b/sky/engine/bindings/scripts/dart_types.py
@@ -483,6 +483,7 @@ IDL_TO_DART_TYPE = {
'DartValue': 'dynamic',
'boolean': 'bool',
'void': 'void',
+ 'unsigned long': 'int',
}
def idl_type_to_dart_type(idl_type):
@@ -496,7 +497,7 @@ def idl_type_to_dart_type(idl_type):
return 'double'
native_array_element_type = idl_type.native_array_element_type
if native_array_element_type:
- return 'List<%s>' % native_array_element_type
+ return 'List<%s>' % idl_type_to_dart_type(native_array_element_type)
assert preprocessed_type
assert idl_type.is_interface_type, "Missing dart type mapping for '%s'" % preprocessed_type
return preprocessed_type
@@ -505,7 +506,7 @@ def idl_type_to_dart_type(idl_type):
DART_DEFAULT_VALUES_BY_TYPE = {
'String': '""',
'bool': 'false',
- 'double': '0',
+ 'double': '0.0',
'dynamic': 'null',
'int': '0',
}
« no previous file with comments | « sky/engine/bindings/scripts/compiler.py ('k') | sky/engine/bindings/scripts/templates/dart_blink.template » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698