mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
14 lines
306 B
Solidity
14 lines
306 B
Solidity
// Previously, the type information for A was not yet available at the point of
|
|
// "new A".
|
|
contract B {
|
|
A a;
|
|
constructor() public {
|
|
a = new A(this);
|
|
}
|
|
}
|
|
contract A {
|
|
constructor(address a) internal {}
|
|
}
|
|
// ----
|
|
// TypeError: (141-146): Contract with internal constructor cannot be created directly.
|