Open hamidb80 opened 1 year ago
it's kinda related to lambda lifting
at compile time
!nim c
proc wrap(fn: static[proc: int]): proc: int = fn
const
c1 = proc: int = 1
c2 = proc: int = 2
wrapped_c1 = wrap c1
wrapped_c2 = wrap c2
doAssert not(c2 == c1)
doAssert not(c2() == c1())
doAssert not(wrapped_c2 == wrapped_c1)
doAssert not(wrapped_c2() == wrapped_c1())
doAssert wrapped_c1() == 1
doAssert wrapped_c2() == 2
@juancarlospaco (contributor)devel :-1: FAIL
Output
Error: Command failed: nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim temp
/home/runner/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim failedAssertImpl
/home/runner/.choosenim/toolchains/nim-#devel/lib/std/assertions.nim raiseAssert
/home/runner/.choosenim/toolchains/nim-#devel/lib/system/fatal.nim sysFatal
Error: unhandled exception: /home/runner/work/Nim/Nim/temp.nim(9, 1) `not (wrapped_c2 == wrapped_c1)` [AssertionDefect]
Error: execution of an external program failed: '/home/runner/work/Nim/Nim/temp'
2023-07-09T14:23:52Z
2023-07-09T14:24:29
2023-07-09T14:24:29
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
Error: Command failed: nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim temp
/home/runner/.choosenim/toolchains/nim-1.6.14/lib/system/assertions.nim failedAssertImpl
/home/runner/.choosenim/toolchains/nim-1.6.14/lib/system/assertions.nim raiseAssert
/home/runner/.choosenim/toolchains/nim-1.6.14/lib/system/fatal.nim sysFatal
Error: unhandled exception: /home/runner/work/Nim/Nim/temp.nim(9, 1) `not (wrapped_c2 == wrapped_c1)` [AssertionDefect]
Error: execution of an external program failed: '/home/runner/work/Nim/Nim/temp '
2023-07-09T14:23:52Z
2023-07-09T14:24:30
2023-07-09T14:24:31
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
Error: Command failed: nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim temp
/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system/assertions.nim failedAssertImpl
/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system/assertions.nim raiseAssert
/home/runner/.choosenim/toolchains/nim-1.6.0/lib/system/fatal.nim sysFatal
Error: unhandled exception: /home/runner/work/Nim/Nim/temp.nim(9, 1) `not (wrapped_c2 == wrapped_c1)` [AssertionDefect]
Error: execution of an external program failed: '/home/runner/work/Nim/Nim/temp '
2023-07-09T14:23:52Z
2023-07-09T14:24:33
2023-07-09T14:24:34
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
Error: Command failed: nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim temp
/home/runner/.choosenim/toolchains/nim-1.4.0/lib/system/assertions.nim failedAssertImpl
/home/runner/.choosenim/toolchains/nim-1.4.0/lib/system/assertions.nim raiseAssert
/home/runner/.choosenim/toolchains/nim-1.4.0/lib/system/fatal.nim sysFatal
Error: unhandled exception: /home/runner/work/Nim/Nim/temp.nim(9, 1) `not (wrapped_c2 == wrapped_c1)` [AssertionDefect]
Error: execution of an external program failed: '/home/runner/work/Nim/Nim/temp '
2023-07-09T14:23:52Z
2023-07-09T14:24:37
2023-07-09T14:24:38
1 minute
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
Error: Command failed: nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim temp
/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/assertions.nim failedAssertImpl
/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/assertions.nim raiseAssert
/home/runner/.choosenim/toolchains/nim-1.2.0/lib/system/fatal.nim sysFatal
Error: unhandled exception: /home/runner/work/Nim/Nim/temp.nim(9, 1) `not (wrapped_c2 == wrapped_c1)` [AssertionError]
Error: execution of an external program failed: '/home/runner/work/Nim/Nim/temp '
2023-07-09T14:23:52Z
2023-07-09T14:24:53
2023-07-09T14:24:54
now
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
Error: Command failed: nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
/home/runner/work/Nim/Nim/temp.nim temp
/home/runner/.choosenim/toolchains/nim-1.0.0/lib/system/assertions.nim failedAssertImpl
/home/runner/.choosenim/toolchains/nim-1.0.0/lib/system/assertions.nim raiseAssert
/home/runner/.choosenim/toolchains/nim-1.0.0/lib/system/fatal.nim sysFatal
Error: unhandled exception: /home/runner/work/Nim/Nim/temp.nim(9, 1) `not (wrapped_c2 == wrapped_c1)` [AssertionError]
Error: execution of an external program failed: '/home/runner/work/Nim/Nim/temp '
2023-07-09T14:23:52Z
2023-07-09T14:25:07
2023-07-09T14:25:07
now
nim c --run -d:strip -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --threads:off --verbosity:0 --hints:off --warnings:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
43 minutes
bisecting 6
commits at 0
commits per second.
Description
Nim Version
Current Output
Expected Output
Additional Information
without
static
andconst
everything works fine.