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

Conversion error reported as V bug #16244

Open
wbehrens-on-gh opened this issue Oct 28, 2022 · 2 comments
Open

Conversion error reported as V bug #16244

wbehrens-on-gh opened this issue Oct 28, 2022 · 2 comments
Labels
Needs Reproducible Example This issue lacks a reproducible example.

Comments

@wbehrens-on-gh
Copy link

V doctor:

OS: linux, Pop!_OS 22.04 LTS
Processor: 8 cpus, 64bit, little endian, 11th Gen Intel(R) Core(TM) i7-1165G7 @ 2.80GHz
CC version: cc (Ubuntu 11.2.0-19ubuntu1) 11.2.0

getwd: /home/will/Code/projects/personal/coach
vmodules: /home/will/.vmodules
vroot: /home/will/.local/v
vexe: /home/will/.local/v/v
vexe mtime: 2022-10-28 17:03:18
is vroot writable: true
is vmodules writable: true
V full version: V 0.3.1 7f294c8.c6158e4

Git version: git version 2.34.1
Git vroot status: weekly.2022.43-32-gc6158e45
.git/config present: true
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3

What did you do?
v -g -o vdbg cmd/v && vdbg src/main.v

module main

import widgets

import ui

fn main() {
	//tabs: Calories, Workouts, Estimates, Profile, Help
	win := ui.window(
		width: 800
		height: 800
		title: "VUI Test"
		children: [
			widgets.vertical_align(
				id: 'vertical',
				children: [
					ui.label(
						text: "hello!"
					)
				]
			)
		]
	)

	ui.run(win)
}

What did you expect to see?

A component made with V UI

What did you see instead?

make action=run build
make[1]: Entering directory '/home/will/Code/projects/personal/coach'
v -cg -o _output/coach run . 
/tmp/v_1000/coach.17105676361560515662.tmp.c:17582: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17583: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17584: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17585: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17586: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17587: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17588: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17589: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17590: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17591: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17592: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:17593: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:39976: warning: assignment discards qualifiers from pointer target type
/tmp/v_1000/coach.17105676361560515662.tmp.c:64084: warning: assignment from incompatible pointer type
/tmp/v_1000/coach.17105676361560515662.tmp.c:68086: warning: implicit declaration of function 'I_Array_ui__Widget_to_Interface_ui__Widget'
/tmp/v_1000/coach.17105676361560515662.tmp.c:68086: warning: assignment makes pointer from integer without a cast
/tmp/v_1000/coach.17105676361560515662.tmp.c:68086: warning: cast between pointer and integer of different size
/tmp/v_1000/coach.17105676361560515662.tmp.c:68086: error: cannot convert 'struct ui__Widget' to 'int'
@wbehrens-on-gh
Copy link
Author

It seems to be a simple conversion error but I'm unsure why it get's far enough to be viewed as a bug in V

@spytheman
Copy link
Member

What or where is widgets ?

Without it, it is not possible/easy to reproduce your bug.

@ArtemkaKun ArtemkaKun added the Needs Reproducible Example This issue lacks a reproducible example. label Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Reproducible Example This issue lacks a reproducible example.
Projects
None yet
Development

No branches or pull requests

3 participants