Skip to content
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

Printing function result calls it 2 times. #20282

Closed
katekyy opened this issue Dec 27, 2023 · 0 comments · Fixed by #20288
Closed

Printing function result calls it 2 times. #20282

katekyy opened this issue Dec 27, 2023 · 0 comments · Fixed by #20288
Assignees
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@katekyy
Copy link
Contributor

katekyy commented Dec 27, 2023

Describe the bug

I don't know how to really describe this more than I said in the title.
You can see for yourself in the reproduction steps.

Reproduction Steps

struct Abc {
	s string
}

fn test() &Abc {
	dump('test')
	return &Abc{}
}

fn main() {
	println(test())
}

Expected Behavior

[code.v:6] 'test': test
&Abc{
    s: ''
}

Current Behavior

[code.v:6] 'test': test
[code.v:6] 'test': test
&Abc{
    s: ''
}

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.3 8f76a06

Environment details (OS name and version, etc.)

V full version: V 0.4.3 8f76a06.6a04feb
OS: linux, Linux version 6.1.68-1-lts (linux-lts@archlinux) (gcc (GCC) 13.2.1 20230801, GNU ld (GNU Binutils) 2.41.0) #1 SMP PREEMPT_DYNAMIC Wed, 13 Dec 2023 18:48:47 +0000
Processor: 8 cpus, 64bit, little endian, 11th Gen Intel(R) Core(TM) i5-1135G7 @ 2.40GHz

vroot: OK, value: /home/katekyy/.local/share/v
VMODULES: OK, value: /home/katekyy/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.43.0
Git vroot status: weekly.2023.41-563-g6a04febb
.git/config present: true

CC version: cc (GCC) 13.2.1 20230801
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3

@katekyy katekyy added the Bug This tag is applied to issues which reports bugs. label Dec 27, 2023
@katekyy katekyy changed the title Printing function results calls it 2 times. Printing function result calls it 2 times. Dec 27, 2023
@shove70 shove70 self-assigned this Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants