[
https://issues.apache.org/jira/browse/THRIFT-3905?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15446176#comment-15446176
]
ASF GitHub Bot commented on THRIFT-3905:
----------------------------------------
Github user markerickson-wf commented on a diff in the pull request:
https://github.com/apache/thrift/pull/1068#discussion_r76627300
--- Diff: compiler/cpp/src/generate/t_dart_generator.cc ---
@@ -2312,6 +2313,34 @@ string t_dart_generator::type_to_enum(t_type* type) {
throw "INVALID TYPE IN type_to_enum: " + type->get_name();
}
+std::string t_dart_generator::init_value(t_type* ttype) {
+ string result = "";
+ if (ttype->is_typedef()) {
+ ttype = ((t_typedef*)ttype)->get_type();
--- End diff --
ugh, a tab vs space issue - thanks
> Dart compiler does not initialize bool, int, and double properties
> ------------------------------------------------------------------
>
> Key: THRIFT-3905
> URL: https://issues.apache.org/jira/browse/THRIFT-3905
> Project: Thrift
> Issue Type: Improvement
> Components: Dart - Compiler
> Affects Versions: 0.10.0
> Reporter: Mark Erickson
> Assignee: Mark Erickson
> Fix For: 0.10.0
>
>
> In Dart it is desirable to initialize bool (false), int (0), and double (0.0)
> properties instead of leaving them with the value of null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)