Repository navigation
defect &Object{}.aย #22688
Copy link
Copy link
Closed
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.Unit: cgenBugs/feature requests, that are related to the default C generating backend.Bugs/feature requests, that are related to the default C generating backend.
Description
V doctor:
V full version: V 0.4.8 df4c6ac.5d76ee4
OS: linux, Debian GNU/Linux 12 (bookworm) (VM)
Processor: 1 cpus, 64bit, little endian, DO-Premium-AMD
getwd: /home/user/github.com/markfirmware/vlister/src
vexe: /home/user/github.com/vlang/v/v
vexe mtime: 2024-10-28 20:57:38
vroot: OK, value: /home/user/github.com/vlang/v
VMODULES: OK, value: /home/user/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.39.5
Git vroot status: weekly.2024.43-58-g5d76ee46
.git/config present: true
CC version: cc (Debian 12.2.0-14) 12.2.0
thirdparty/tcc status: thirdparty-linux-amd64 0134e9b9
What did you do?
./v -g -o vdbg cmd/v && ./vdbg field_ref_main.v
struct Object {
a int
}
fn main() {
field := &Object{}.a
println('${field}')
}What did you expect to see?
compile ok
What did you see instead?
================== C compilation error (from tcc): ==============
cc: /tmp/v_1000/field_ref_main.01JBAEQVFERFTWSV304MH6SME1.tmp.c:13476: error: lvalue expected
=================================================================
(You can pass `-cg`, or `-show-c-output` as well, to print all the C error messages).
builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
BugThis tag is applied to issues which reports bugs.This tag is applied to issues which reports bugs.Status: ConfirmedThis bug has been confirmed to be valid by a contributor.This bug has been confirmed to be valid by a contributor.Unit: cgenBugs/feature requests, that are related to the default C generating backend.Bugs/feature requests, that are related to the default C generating backend.
Activity