You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mark Erickson (JIRA)" <ji...@apache.org> on 2016/02/29 02:40:18 UTC
[jira] [Updated] (THRIFT-3697) Dart generator does not name imports
[ https://issues.apache.org/jira/browse/THRIFT-3697?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Erickson updated THRIFT-3697:
----------------------------------
Component/s: Dart - Compiler
> Dart generator does not name imports
> ------------------------------------
>
> Key: THRIFT-3697
> URL: https://issues.apache.org/jira/browse/THRIFT-3697
> Project: Thrift
> Issue Type: Bug
> Components: Dart - Compiler
> Reporter: Mark Erickson
> Assignee: Mark Erickson
>
> h4. PROBLEM
> The example below results in a Dart analyzer error since the reference to b.Foo is ambiguous in the generated code.
> h4. FIX
> Name imports for dependencies to make references explicit.
> h4. EXAMPLE
> {code}thrift -r --gen dart a.thrift{code}
> a.thrift
> {code}
> include "b.thrift"
> namespace dart a
> /**@ Foo in a*/
> struct Foo {
> 1:string name
> }
> /**@ Bar in a*/
> struct Bar {
> 1:Foo aFoo,
> 2:b.Foo bFoo
> }
> {code}
> b.thrift
> {code}
> namespace dart b
> /**@ Foo in b*/
> struct Foo {
> 1:string name
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)