Skip to content

about import warning #3737

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
lydiandy opened this issue Feb 14, 2020 · 1 comment
Open

about import warning #3737

lydiandy opened this issue Feb 14, 2020 · 1 comment
Assignees
Labels
Bug This tag is applied to issues which reports bugs. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Checker Bugs/feature requests, that are related to the type checker.

Comments

@lydiandy
Copy link
Contributor

lydiandy commented Feb 14, 2020

V version:
latest:V 0.1.25 5a6f4aa
OS:
mac

What did you do?
in my module,when I import time module,I just want to use the C function defined

pub struct C.timeval {
	tv_sec  u64
	tv_usec u64
}

I do not use any other function or struct in time module

What did you expect to see?
the code can run without a warning.
I think one module just only use the C function defined in the other module,It can also be treated as
use the module

What did you see instead?
the V compiler give me a warning:the following imports were never used: time
so I have to redefine C.timeval struct in my own module

@lydiandy lydiandy added the Bug This tag is applied to issues which reports bugs. label Feb 14, 2020
@M4SSD35TRUCT10N M4SSD35TRUCT10N added this to the Beta Release milestone Apr 5, 2020
@ArtemkaKun ArtemkaKun removed this from the Beta Release milestone May 26, 2023
@esquerbatua esquerbatua added Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Checker Bugs/feature requests, that are related to the type checker. labels Sep 26, 2024
@esquerbatua
Copy link
Contributor

tiny replication:

module main

pub struct C.aa {
	a  u64
}

pub fn main() {}

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. Status: Confirmed This bug has been confirmed to be valid by a contributor. Unit: Checker Bugs/feature requests, that are related to the type checker.
Projects
None yet
Development

No branches or pull requests

5 participants