This commit is contained in:
Daniel Kirchner
2023-06-24 01:21:14 +02:00
parent 315270f3bb
commit 7d094b3be6
22 changed files with 933 additions and 174 deletions
@@ -1,28 +1,44 @@
pragma experimental solidity;
class a:StackType {
function stackSize() -> x:integer;
class a:A {
function testValue(x:a) -> y:word;
}
instantiation word : StackType {
function stackSize() -> x:integer {
return x;
}
class a:B {
function testValue(x:a) -> y:word;
}
function f(a) -> b {
instantiation word : A {
function testValue(x:word) -> y:word {
assembly {
y := 7
}
}
}
instantiation word : B {
function testValue(x:word) -> y:word {
assembly {
y := 14
}
}
}
function f(a:_:A) -> b:_:B {
return a;
}
contract C {
fallback() external {
let x : word;
let y : word;
let x : word : A;
let y;
assembly {
x := 0x42
}
y = f(x);
y = B.testValue(x);
assembly {
mstore(0, y)
return(0, 32)