Index: Source/bindings/dart/scripts/dart_methods.py |
diff --git a/Source/bindings/dart/scripts/dart_methods.py b/Source/bindings/dart/scripts/dart_methods.py |
index eb4b14e27af12d150460a69acdbaa0ace5d2a3ca..b700e8939fef3e25b888a9fe202b92da7939a4f0 100644 |
--- a/Source/bindings/dart/scripts/dart_methods.py |
+++ b/Source/bindings/dart/scripts/dart_methods.py |
@@ -130,6 +130,10 @@ def argument_context(interface, method, argument, index): |
preprocessed_type = 'float' |
if preprocessed_type == 'unrestricted double': |
preprocessed_type = 'double' |
+ |
+ dart_enum_expression = idl_type.enum_validation_expression |
+ if dart_enum_expression: |
+ dart_enum_expression = dart_enum_expression.format(param_name=argument.name) |
context.update({ |
'cpp_type': idl_type.cpp_type_args(extended_attributes=extended_attributes, |
raw_type=True, |
@@ -138,7 +142,7 @@ def argument_context(interface, method, argument, index): |
'local_cpp_type': local_cpp_type, |
# FIXME: check that the default value's type is compatible with the argument's |
'default_value': default_value, |
- 'enum_validation_expression': idl_type.enum_validation_expression, |
+ 'enum_validation_expression': dart_enum_expression, |
'preprocessed_type': preprocessed_type, |
'is_array_or_sequence_type': not not idl_type.native_array_element_type, |
'is_strict_type_checking': 'DartStrictTypeChecking' in extended_attributes, |