E0010: conflicting target platforms

View source

One declaration can carry only one meta target selector.

One declaration can carry only one meta target selector. When two attributes in front of the same declaration name different selectors, no platform could satisfy both, and ADR-0015 makes contradictory metadata a compile-time error. The message names both selectors. posix and unix are different selectors, even though they overlap on most hosts.

Example

actus
meta target("unix")
meta target("windows")
verb main() {
}

Fix

Keep one selector. To have a version for each platform, write two declarations, each with its own selector.

actus
meta target("unix")
verb main() {
}

Run actus explain E0010 in your terminal to read this entry offline. Browse Lexer & parser or all error codes.