Files
c3c/test/test_suite/compile_time/ct_sprintf.c3t
Christoffer Lerno 40554192b1 - Make accepting arguments for main a bit more liberal, accepting main(int argc, ZString* argv)
- Make `$echo` and `@sprintf` correctly stringify compile time initializers and slices.
- Fixes methodsof to pick up all sorts of extension methods. #2192
- Fix regression accidentally allowing `$assert $foo, $bar`
2025-06-08 00:23:04 +02:00

14 lines
357 B
Plaintext

// #target: macos-x64
module test;
fn void main()
{
var $foo = "hello";
var $c = { 1, 3 };
String x = $$sprintf("%s %s", $foo, $c);
String y = @sprintf("%s %s", $c, $foo);
}
/* #expect: test.ll
@.str = private unnamed_addr constant [15 x i8] c"hello { 1, 3 }\00", align 1
@.str.1 = private unnamed_addr constant [15 x i8] c"{ 1, 3 } hello\00", align 1