You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a bug with the generics where it will not produce the generic function for the second use of the generic function. In this case, func2[Struct1] is generated, but func2[Struct2] is not, causing a compilation error
PS C:\Users\jcwea\Documents\git\vtest> v -cg run .
C:/Users/jcwea/AppData/Local/Temp/v_0/vtest.01HPSP98VD487P3GG4CG3VMKQV.tmp.c:497: warning: WINVER redefined
C:/Users/jcwea/AppData/Local/Temp/v_0/vtest.01HPSP98VD487P3GG4CG3VMKQV.tmp.c:6880: warning: implicit declaration of function 'tcc_backtrace'
C:/Users/jcwea/AppData/Local/Temp/v_0/vtest.01HPSP98VD487P3GG4CG3VMKQV.tmp.c:13104: error: 'main__func2_T_main__Struct2' undeclared
builder error:
==================
C error. This should never happen.
This is a compiler bug, please report it using `v bug file.v`.
https://github.com/vlang/v/issues/new/choose
You can also use #help on Discord: https://discord.gg/vlang
V full version: V 0.4.4 afd74ad.1d3147e
OS: windows, Microsoft Windows 11 Pro v26058 64-bit
Processor: 24 cpus, 64bit, little endian,
getwd: C:\Users\jcwea\Documents\git\vtest
vexe: C:\Users\jcwea\Documents\git\v\v.exe
vexe mtime: 2024-02-16 19:26:43
vroot: OK, value: C:\Users\jcwea\Documents\git\v
VMODULES: OK, value: C:\Users\jcwea\.vmodules
VTMP: OK, value: C:\Users\jcwea\AppData\Local\Temp\v_0
Git version: git version 2.40.0.windows.1
Git vroot status: weekly.2024.06-86-g1d3147e1
.git/config present: true
CC version: Error: 'cc' is not recognized as an internal or external command,
operable program or batch file.
thirdparty/tcc status: thirdparty-windows-amd64 b99a453d
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:
Describe the bug
There is a bug with the generics where it will not produce the generic function for the second use of the generic function. In this case, func2[Struct1] is generated, but func2[Struct2] is not, causing a compilation error
Reproduction Steps
The following code will produce the issue
Expected Behavior
successful compile
Current Behavior
Fails to compile with the following error
Possible Solution
No response
Additional Information/Context
No response
V version
V 0.4.4 1d3147e
Environment details (OS name and version, etc.)
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: