Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Proposal: allow top-level conditional for imports #2251

@LowByteFox

Description

@LowByteFox

While it is possible to have separate modules using @if

module foo @if(...);

module foo @if(...);

I think it could be neat to also have this supported with import, so that less code duplication could occur

module foo;
import bar @if(...);

As of now, compiler returns Error: Only '@public' and '@norecurse' are valid attributes here. as expected.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions