VM FFI: write(stderr, msg) and fprintf(cstderr, msg) now work at CT (#13083)

This commit is contained in:
Timothee Cour 2020-01-12 04:44:43 -08:00 • committed by Andreas Rumpf
commit ee1563ef33
3 changed files with 29 additions and 5 deletions

View file

@ -8,6 +8,8 @@ foo:102:103
foo:102:103:104
foo:0.03:asdf:103:105
ret={s1:foobar s2:foobar age:25 pi:3.14}
hello world stderr
hi stderr
'''
output: '''
foo
@ -17,6 +19,8 @@ foo:102:103
foo:102:103:104
foo:0.03:asdf:103:105
ret={s1:foobar s2:foobar age:25 pi:3.14}
hello world stderr
hi stderr
'''
disabled: "true"
"""
@ -76,6 +80,15 @@ proc fun() =
if false:
c_printf("foo2:a=%d\n", a2)
static:
fun()
fun()
when true:
import system/ansi_c
proc fun2()=
c_fprintf(cstderr, "hello world stderr\n")
write(stderr, "hi stderr\n")
static: fun2()
fun2()