Skip to content

cgen error assignment from incompatible pointer type #18977

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

Open
einar-hjortdal opened this issue Jul 26, 2023 · 0 comments
Open

cgen error assignment from incompatible pointer type #18977

einar-hjortdal opened this issue Jul 26, 2023 · 0 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@einar-hjortdal
Copy link
Contributor

einar-hjortdal commented Jul 26, 2023

Describe the bug

cgen error encountered while debugging another issue.

v -cg run src/client_test.v
/tmp/v_1000/client_test.9951572263371855179.tmp.c:35491: warning: assignment from incompatible pointer type
/tmp/v_1000/client_test.9951572263371855179.tmp.c:36180: error: function pointer expected
builder error: 
==================
C error. This should never happen.

I do not know what causes it exactly so I have created a branch in my project for repro purposes.

I think it is caused by trying to assign map[string]json2.Any to a json2.Any

Expected Behavior

No cgen error

Current Behavior

cgen error

Reproduction Steps

  1. Clone this repository branch
  2. v run src/client_test.v

Possible Solution

No response

Additional Information/Context

No response

V version

Current V version: V 0.4.0 7d6fd9d, timestamp: 2023-07-26 22:17:45 +0300

Environment details (OS name and version, etc.)

V full version: V 0.4.0 ee4150f.7d6fd9d
OS: linux, Linux version 5.14.0-284.18.1.el9_2.x86_64 (mockbuild@euro.kojibuilder101) (gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4), GNU ld version 2.35.2-37.el9) #1 SMP PREEMPT_DYNAMIC Fri Jun 23 16:35:13 CEST 2023
Processor: 4 cpus, 64bit, little endian, Intel(R) Core(TM) i3-5005U CPU @ 2.00GHz

getwd: /home/coachonko/Documents/projects/vlang/redis
vexe: /home/coachonko/.local/lib64/v/v
vexe mtime: 2023-07-26 20:04:44

vroot: OK, value: /home/coachonko/.local/lib64/v
VMODULES: OK, value: /home/coachonko/.vmodules
VTMP: OK, value: /tmp/v_1000

Git version: git version 2.39.3
Git vroot status: weekly.2023.28-96-g7d6fd9da
.git/config present: true

CC version: cc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4)
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3
@einar-hjortdal einar-hjortdal added the Bug This tag is applied to issues which reports bugs. label Jul 26, 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

No branches or pull requests

1 participant