aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/interface
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-02 18:26:43 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-04 21:03:37 +0800
commit494dea262e7d671ccd0f98b2df1c99fd86097adc (patch)
treed577fba5edef77ad2225ba456a090241dca02760 /libsolidity/interface
parentc835bcec623d6b6166add70456f5b6bee5c90572 (diff)
downloaddexon-solidity-494dea262e7d671ccd0f98b2df1c99fd86097adc.tar.gz
dexon-solidity-494dea262e7d671ccd0f98b2df1c99fd86097adc.tar.zst
dexon-solidity-494dea262e7d671ccd0f98b2df1c99fd86097adc.zip
Show unimplemented function if trying to instantiate an abstract class
Diffstat (limited to 'libsolidity/interface')
-rw-r--r--libsolidity/interface/ErrorReporter.cpp10
-rw-r--r--libsolidity/interface/ErrorReporter.h6
2 files changed, 16 insertions, 0 deletions
diff --git a/libsolidity/interface/ErrorReporter.cpp b/libsolidity/interface/ErrorReporter.cpp
index f9ef4ceb..e6171756 100644
--- a/libsolidity/interface/ErrorReporter.cpp
+++ b/libsolidity/interface/ErrorReporter.cpp
@@ -151,6 +151,16 @@ void ErrorReporter::syntaxError(SourceLocation const& _location, string const& _
);
}
+void ErrorReporter::typeError(SourceLocation const& _location, SecondarySourceLocation const& _secondaryLocation, string const& _description)
+{
+ error(
+ Error::Type::TypeError,
+ _location,
+ _secondaryLocation,
+ _description
+ );
+}
+
void ErrorReporter::typeError(SourceLocation const& _location, string const& _description)
{
error(
diff --git a/libsolidity/interface/ErrorReporter.h b/libsolidity/interface/ErrorReporter.h
index 8b066a3e..42b0c8b6 100644
--- a/libsolidity/interface/ErrorReporter.h
+++ b/libsolidity/interface/ErrorReporter.h
@@ -73,6 +73,12 @@ public:
void syntaxError(SourceLocation const& _location, std::string const& _description);
+ void typeError(
+ SourceLocation const& _location,
+ SecondarySourceLocation const& _secondaryLocation,
+ std::string const& _description
+ );
+
void typeError(SourceLocation const& _location, std::string const& _description);
void fatalTypeError(SourceLocation const& _location, std::string const& _description);