mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add some bytecode reference tests.
This commit is contained in:
parent
5433a640fb
commit
47728a083f
@ -0,0 +1,11 @@
|
||||
library L1 {
|
||||
function foo() internal { new A(); }
|
||||
}
|
||||
library L2 {
|
||||
function foo() internal { L1.foo(); }
|
||||
}
|
||||
contract A {
|
||||
function f() public pure { L2.foo(); }
|
||||
}
|
||||
// ----
|
||||
// TypeError 7813: (43-48): Circular reference to contract bytecode either via "new" or "type(...).creationCode" / "type(...).runtimeCode".
|
@ -0,0 +1,11 @@
|
||||
library L1 {
|
||||
function foo() internal { new A(); }
|
||||
}
|
||||
library L2 {
|
||||
function foo() internal { L1.foo(); }
|
||||
}
|
||||
contract A {
|
||||
function f() public pure { type(L2).creationCode; }
|
||||
}
|
||||
// ----
|
||||
// Warning 6133: (157-178): Statement has no effect.
|
@ -0,0 +1,10 @@
|
||||
library L1 {
|
||||
function foo() internal { new A(); }
|
||||
}
|
||||
library L2 {
|
||||
function foo() public { L1.foo(); }
|
||||
}
|
||||
contract A {
|
||||
function f() public { L2.foo(); }
|
||||
}
|
||||
// ----
|
@ -0,0 +1,9 @@
|
||||
library L1 {
|
||||
function foo() public { L2.foo(); }
|
||||
|
||||
}
|
||||
library L2 {
|
||||
function foo() internal { type(L1).creationCode; }
|
||||
}
|
||||
// ----
|
||||
// TypeError 7813: (99-120): Circular reference to contract bytecode either via "new" or "type(...).creationCode" / "type(...).runtimeCode".
|
Loading…
Reference in New Issue
Block a user