Error when calling Enum.from_string imported from external module #20050
Labels
Bug
This tag is applied to issues which reports bugs.
Unit: Compiler
Bugs/feature requests, that are related to the V compiler in general.
Describe the bug
Reproduction Steps
Create an enum in a module called my_module... ex:
In another module, import and call the from_string method, e.g.:
complete code if it is more practical
test-call-method-enum.zip
Expected Behavior
The following result should return from the dump:
x: Option(any1)
Current Behavior
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.3 2964855.300158d
Environment details (OS name and version, etc.)
V full version: V 0.4.3 2964855.300158d
OS: windows, Microsoft Windows 11 Pro v22631 64 bits
Processor: 12 cpus, 64bit, little endian,
getwd: C:\Users\AndreLuiz\Desktop\teste
vexe: C:\v\v.exe
vexe mtime: 2023-11-30 19:24:52
vroot: OK, value: C:\v
VMODULES: OK, value: C:\Users\AndreLuiz.vmodules
VTMP: OK, value: C:\Users\AndreLuiz\AppData\Local\Temp\v_0
Git version: git version 2.42.0.windows.2
Git vroot status: weekly.2023.48-20-g300158dd-dirty (5 commit(s) behind V master)
.git/config present: true
CC version: Error: 'cc' não é reconhecido como um comando interno
ou externo, um programa operável ou um arquivo em lotes.
thirdparty/tcc status: thirdparty-windows-amd64 a39eb79b
V full version: V 0.4.3 150f225
OS: linux, Ubuntu 22.04.3 LTS (WSL 2)
Processor: 12 cpus, 64bit, little endian, 12th Gen Intel(R) Core(TM) i5-12450H
getwd: /mnt/c/Users/AndreLuiz/Desktop/teste
vexe: /home/andre/v/v
vexe mtime: 2023-12-01 00:23:13
vroot: OK, value: /home/andre/v
VMODULES: OK, value: /root/.vmodules
VTMP: OK, value: /tmp/v_0
Git version: git version 2.34.1
Git vroot status: weekly.2023.38-566-g150f2259
.git/config present: true
CC version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
thirdparty/tcc status: thirdparty-linux-amd64 12f392c3
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.
The text was updated successfully, but these errors were encountered: