Skip to content

Including a class with the same name as a class in avdl file gets shadowed #25

@khoberg

Description

@khoberg

I'm trying to use a class from another avdl file in a file with a record of the same name. When this gets generated, the resulting scala uses the class inside the file rather than the class imported.

Example:
fileOne.avdl

@namespace("com.my.package.one")
protocol ProtocolOne {
    record MyRecord {
        ....
    }
}

fileTwo.avdl

@namespace("com.my.package.two")
protocol ProtocolTwo {
    record MyRecord {
        ....
    }

    record UsesMyRecord {
        com.my.package.one.MyRecord myRecord;
    }
}

Resulting case class UsesMyRecord will use com.my.package.two's MyRecord since the generated case class doesn't keep the full class path

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions