cli: preserve whole-array arguments for explicit array parameters
This commit is contained in:
1 parent
f733f7c7bb
commit
dde801c653
44 files changed
+397
-9
No files matched your search
@@ -0,0 +1,7 @@
|
||||
// expect: run
|
||||
// result: 42
|
||||
// phase: 6
|
||||
// spec: docs/spec/15-source-language.md §5
|
||||
module test.array_arguments
|
||||
fn first<T: Copy>(a: ref<[T; 2]>) -> T effects [] { return a[0]; }
|
||||
fn main() -> u64 effects [] { let a = [42u64; 2]; return first::<u64>(ref a); }
|
||||
Reference in new issue
Block a user