mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Revert "Revert 0.7.6 code for 0.7.5 re-release"
This reverts commit d1349c9cfb.
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
fn int main(String[] args)
|
||||
{
|
||||
MyArray a = {{1, 4, 3, 6, 5}};
|
||||
$assert(!$defined(a[0] = 2));
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct MyArray
|
||||
{
|
||||
int[] val;
|
||||
}
|
||||
|
||||
fn int MyArray.get(self, usz idx) @operator([]) => self.val[idx];
|
||||
fn usz MyArray.len(self) @operator(len) => self.val.len;
|
||||
Reference in New Issue
Block a user