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
type G[A] =object
v:A
type F {.borrow: `.`.} =distinct G
var g =G[int](v:1)
var f =F(g)
echo g.v
echo f.v
using compiler
Nim Compiler Version 0.17.1 (2017-06-30) [MacOSX: amd64]
Copyright (c) 2006-2017 by Andreas Rumpf
git hash: 4de989d1c5e69393e3ac14fa0516203d0d06773a
active boot switches: -d:release
The c compiler complaints about the bad c code.
$ nim c t.nim
Hint: used config file '/Users/jin/pkg/src/Nim-devel/config/nim.cfg' [Conf]
Hint: system [Processing]
Hint: t [Processing]
CC: tmp_t
CC: stdlib_system
Error: execution of an external compiler program 'clang -c -w -I/Users/jin/pkg/src/Nim-devel/lib -o /Users/jin/tmp/nimcache/tmp_t.o /Users/jin/tmp/nimcache/tmp_t.c' failed with exit code: 1
/Users/jin/tmp/nimcache/tmp_t.c:133:27: error: assigning to 'G_No3p5m0ZKtGo56MF2jraGw' (aka 'struct G_No3p5m0ZKtGo56MF2jraGw') from incompatible type 'G_jdHvP31usBP9cMk9aMPWrjVA' (aka 'struct G_jdHvP31usBP9cMk9aMPWrjVA')
f_cJwUcqUYRCv7qhxy0Ko3Bg = g_gzmpjI9cnOVgSdyajRkwuzw;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. If you think it is still a valid issue, write a comment below; otherwise it will be closed. Thank you for your contributions.
stalebot
added
the
stale
Staled PR/issues; remove the label after fixing them
label
Aug 4, 2020
With the code
using compiler
The c compiler complaints about the bad c code.
The text was updated successfully, but these errors were encountered: