aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/constructor
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-30 23:46:43 +0800
committerGitHub <noreply@github.com>2018-11-30 23:46:43 +0800
commit474e7b563561373c04ea954875d4acc7ad025ae4 (patch)
tree33ede927020131d72301ed4a4d799264bbc43958 /test/libsolidity/syntaxTests/constructor
parent1bbd5977cfd8eb24b3a5cb0d296ce228062b8ebd (diff)
parent17a703f71ac842253e9948dff488cd675e568c1b (diff)
downloaddexon-solidity-474e7b563561373c04ea954875d4acc7ad025ae4.tar
dexon-solidity-474e7b563561373c04ea954875d4acc7ad025ae4.tar.gz
dexon-solidity-474e7b563561373c04ea954875d4acc7ad025ae4.tar.bz2
dexon-solidity-474e7b563561373c04ea954875d4acc7ad025ae4.tar.lz
dexon-solidity-474e7b563561373c04ea954875d4acc7ad025ae4.tar.xz
dexon-solidity-474e7b563561373c04ea954875d4acc7ad025ae4.tar.zst
dexon-solidity-474e7b563561373c04ea954875d4acc7ad025ae4.zip
Merge pull request #5546 from ethereum/inheritanceChecker
Move some checks out of type checker.
Diffstat (limited to 'test/libsolidity/syntaxTests/constructor')
-rw-r--r--test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol b/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol
new file mode 100644
index 00000000..2e6aeaa5
--- /dev/null
+++ b/test/libsolidity/syntaxTests/constructor/abstract_creation_forward_reference.sol
@@ -0,0 +1,15 @@
+// This used to cause an internal error because of the visitation order.
+contract Test {
+ function createChild() public {
+ Child asset = new Child();
+ }
+}
+
+contract Parent {
+ constructor(address _address) public {}
+}
+
+contract Child is Parent {
+}
+// ----
+// TypeError: (146-155): Trying to create an instance of an abstract contract.