Open dcow0 opened 2 years ago
I am also experiencing this issue in my code and was able to reproduce.
The error is different in latest V
report_test.v:3:17: error: unknown type `report.Token`.
Did you mean `Ok<[]report.Token>`?
1 | module report
2 |
3 | type ParseRes = Result<[]Token, ParseErr>
| ~~~~~~~~~~~~~~~~~~~~~~~~~
4 |
5 | struct ParseErr{
report_test.v:31:10: error: unknown type `report.Token`.
Did you mean `Ok<[]report.Token>`?
29 | match r {
30 | Some<ParseRes> {
31 | rx := Result<[]Token, ParseErr>(r)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32 | }
33 | None<ParseRes> {}
V version: V 0.2.4 875ad1f.42a6783 OS: linux, "Fedora release 35 (Thirty Five)"
What did you do?
v report_test.v
wherereport_test.v
has the following content:What did you expect to see? The code should compile
What did you see instead? The compiler fails with