Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type name X redefined from module Y #5588

Closed
ncannasse opened this issue Sep 2, 2016 · 3 comments
Closed

Type name X redefined from module Y #5588

ncannasse opened this issue Sep 2, 2016 · 3 comments
Milestone

Comments

@ncannasse
Copy link
Member

ncannasse commented Sep 2, 2016

I was able to get a properly reproducible example of the above compilation server error.
It goes like this:

class Test {

    static function main() {
        inline function add( ?a : Other.EA, ?b : Other.EB, text : String ) {
            trace( (a == null ? ""+b : ""+a) +" => "+text);
        }
        add(A," is a");
        add(B," is b");
    }

}

// Other.hx
enum EA {
    A;
}

enum EB {
    B;
}
@ncannasse ncannasse added this to the 3.3.0 milestone Sep 2, 2016
@Simn
Copy link
Member

Simn commented Sep 17, 2016

Am I missing some required compiler argument?

>haxe -main Test --connect 6000
>touch Test.hx
>haxe -main Test --connect 6000
>touch Other.hx
>haxe -main Test --connect 6000
>

@ncannasse
Copy link
Member Author

Don't touch between compilations ;)

@Simn
Copy link
Member

Simn commented Sep 19, 2016

Right, I think I tried everything except that...

Interestingly, the EA type does actually make it into the Main module somehow:

Reusing cached module
{
        m_id = 9;
        m_path = Main;
        m_extra = {
                m_file = c:\users\simn\documents\testmisc\src\main.hx;
                m_sign = �Ñòê¡�m÷▒╡┬∩Q/F┬;
                m_time = 1474271967.;
                m_dirty = false;
                m_added = 0;
                m_mark = 51;
                m_deps = {16 = Log, 15 = Other, 8 = Std, 4 = String, 2 = StdTypes};
                m_processed = 1;
                m_kind = MCode;
                m_binded_res = ;
                m_macro_calls = ;
                m_if_feature = ;
                m_features = ;
        };
        m_types = [Main, EA];
}
Reusing cached module
{
        m_id = 15;
        m_path = Other;
        m_extra = {
                m_file = c:\users\simn\documents\testmisc\src\other.hx;
                m_sign = �Ñòê¡�m÷▒╡┬∩Q/F┬;
                m_time = 1474271634.;
                m_dirty = false;
                m_added = 0;
                m_mark = 51;
                m_deps = {4 = String, 2 = StdTypes};
                m_processed = 1;
                m_kind = MCode;
                m_binded_res = ;
                m_macro_calls = ;
                m_if_feature = ;
                m_features = ;
        };
        m_types = [EA, EB];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants