mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-16 16:31:32 +00:00
Simplify resolve infrastructure; Fix handling of nested element and property accesses
This commit is contained in:
19
tests/compiler/std/array-access.ts
Normal file
19
tests/compiler/std/array-access.ts
Normal file
@ -0,0 +1,19 @@
|
||||
export function i32ArrayArrayElementAccess(a: i32[][]): i32 {
|
||||
return a[0][1];
|
||||
}
|
||||
|
||||
export function stringArrayPropertyAccess(a: string[]): i32 {
|
||||
return a[0].length;
|
||||
}
|
||||
|
||||
export function stringArrayMethodCall(a: string[]): i32 {
|
||||
return a[0].startsWith("");
|
||||
}
|
||||
|
||||
export function stringArrayArrayPropertyAccess(a: string[][]): i32 {
|
||||
return a[0][1].length;
|
||||
}
|
||||
|
||||
export function stringArrayArrayMethodCall(a: string[][]): i32 {
|
||||
return a[0][1].startsWith("");
|
||||
}
|
Reference in New Issue
Block a user