mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-30 19:23:57 +00:00
committed by
Andreas Rumpf
parent
45759b5e90
commit
cc2be5e4c6
18
tests/vm/tconstprocassignments.nim
Normal file
18
tests/vm/tconstprocassignments.nim
Normal file
@@ -0,0 +1,18 @@
|
||||
discard """
|
||||
output: '''
|
||||
100
|
||||
100
|
||||
'''
|
||||
"""
|
||||
|
||||
proc f():int {.compileTime.} = 100
|
||||
|
||||
const F = f
|
||||
echo F()
|
||||
|
||||
const G = proc ():int =
|
||||
let x = f
|
||||
let y = x
|
||||
y()
|
||||
|
||||
echo G()
|
||||
Reference in New Issue
Block a user