mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
tmp
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user