Logo
Explore Help
Register Sign In
shishantbiswas/c3c
1
1
Fork 0
You've already forked c3c
mirror of https://github.com/c3lang/c3c.git synced 2026-02-27 12:01:16 +00:00
Code Issues Packages Projects Releases Wiki Activity
Files
dev3
c3c/test/unit/regression/slice_assign.c3
Christoffer Lerno 946c167bf1 Improve error for default args #2096. Deprecated old inference with slice copy. Copying must now ensure a slicing operator at the end of the right hand side: foo[1..2] = bar[..] rather than the old foo[1..2] = bar. The old behaviour can be mostly retained with --use-old-slice-copy).
2025-04-18 17:19:04 +02:00

9 lines
153 B
Plaintext
Raw Permalink Blame History

module slice_assign @test;
fn void assign_slice()
{
int[8] a;
a[2..3] = { 1, 2 }[..];
a[5..7] = 5;
assert(a == (int[8]){ 0, 0, 1, 2, 0, 5, 5, 5});
}
Reference in New Issue View Git Blame Copy Permalink
Powered by Gitea Version: 1.24.4 Page: 101ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API