-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mac: Checking for existence of a key in a map using the 'in' keyword causes a segfault #22121
Comments
I cannot reproduce the problem on my Linux machine. How did you trigger it? When I run the program after compiling as shown, it just hangs until I hit Ctrl-C:
|
It is reproducible on macos:
|
|
That is right. struct Abc { x int }
fn f(shared a Abc) { lock a { println(a.x) } }
fn (shared a Abc) m(){ lock a { println(a.x) } }
// mut a := Abc{}
// f(a) // checker error
mut b := Abc{} // if b is not mutable, there is a checker error, telling the user to declare `b` with `mut` to make it mutable; the message can be changed too, to mention that it should be `shared` too
b.m() // no checker error, but it is better to have one, similar to the `f(a)` case above |
Yes, we should add a checker error. |
I've removed shared receivers from V. Passing tests, will be live soon. |
(as discussed on discord) |
V doctor:
What did you do?
./v -g -o vdbg cmd/v && ./vdbg event_bus_trial.v
What did you expect to see?
hello
What did you see instead?
Note
You can use the 👍 reaction to increase the issue's priority for developers.
Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.
The text was updated successfully, but these errors were encountered: