The r-prefixed waves absorb the runtime, reject, and byte-compare rows of the migrated native carriers; each fixture is one directory with one case.ww and a //ww:error, //ww:compile, //ww:run, or //ww:run-exit directive covering both frontends.
14 lines
243 B
Plaintext
14 lines
243 B
Plaintext
//ww:error c "return [3]int not assignable to A" ww "array literal has 3 elements but declared array holds 2"
|
|
package main;
|
|
|
|
type A = [2]int;
|
|
|
|
fn f() A = {
|
|
return [1, 2, 3];
|
|
};
|
|
|
|
export fn main() i32 = {
|
|
let r: A = f();
|
|
return r[1]: i32;
|
|
};
|