Skip to content

Console.Error.WriteLine problem with Swift #241

Description

@mittelmark

Hi,

Not sure if you saw this:

public static class Test2 {
        public static void Main (string[] args) {
                string hw = "Hello World!";
                Console.Error.WriteLine($"{hw}");
        }
}

works on C, C++, C#, D, Java, JavaScript, Python, Typescript, but not on Swift:

8 |    {
 9 |            let hw: String = "Hello World!"
10 |            fputs("\(hw)\n", stderr)
   |                    `- error: reference to var 'stderr' is not concurrency-safe because it involves shared mutable state
11 |    }

the code https://github.com/fusionlanguage/fut/blob/master/test/ConsoleErrorWriteLine.fu mentioned only CL although on top Swift is marked with a cross.

Not very important for now, we can just write to normal console in Swift in case of errors,

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions