Skip to content

Conditional compilation causes incorrect auto-import placement #846

@ylazy

Description

@ylazy

For example:

    import x.display.SmartLoader;
    import x.events.EventPriority;
    import x.geom.Area;
    
    runtime::air
    {
        import x.codecs.bitmap.webp.WebP;
    }
    
    public class ...

If I write var errorEvent:ErrorEvent and select ErrorEvent from code completion. The code becomes:

    import x.display.SmartLoader;
    import x.events.EventPriority;
    import x.geom.Area;
    
    runtime::air
    {
        import x.codecs.bitmap.webp.WebP;
        import flash.events.ErrorEvent;
    }
    
    public class ...

This is not what I expected. The code should be:

    import x.display.SmartLoader;
    import x.events.EventPriority;
    import x.geom.Area;
    
    runtime::air
    {
        import x.codecs.bitmap.webp.WebP;
    }
    
    import flash.events.ErrorEvent;
    
    public class ...

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions