mirror of
https://github.com/fluencelabs/assemblyscript
synced 2025-06-23 19:51:47 +00:00
Use a special 'auto' type in type inference (#658)
This commit is contained in:
@ -129,3 +129,14 @@ assert(ui == 1);
|
||||
|
||||
ui = 255 % 255;
|
||||
assert(ui == 0);
|
||||
|
||||
// inferring global type from load should still retain T
|
||||
var ri = load<i8>(0);
|
||||
assert(ri instanceof i8);
|
||||
|
||||
// inferring local type from load should still retain T
|
||||
function testLocalRetain(): void {
|
||||
var ri = load<i8>(0);
|
||||
assert(ri instanceof i8);
|
||||
}
|
||||
testLocalRetain();
|
||||
|
Reference in New Issue
Block a user