File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed
test/libsolidity/syntaxTests/inheritance/override Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Compiler Features:
77
88
99Bugfixes:
10+ * Type Checker: Fix internal error when override specifier is not a contract.
1011 * SMTChecker: Fix missing type constraints on block and transaction variables in the deployment phase.
1112
1213
Original file line number Diff line number Diff line change @@ -225,13 +225,12 @@ struct OverrideSpecifierChecker: public PostTypeChecker::Checker
225225 if (dynamic_cast <ContractDefinition const *>(decl))
226226 continue ;
227227
228- TypeType const * actualTypeType = dynamic_cast <TypeType const *>(decl->type ());
229-
228+ auto const * typeType = dynamic_cast <TypeType const *>(decl->type ());
230229 m_errorReporter.typeError (
231230 9301_error,
232231 override ->location (),
233232 " Expected contract but got " +
234- actualTypeType ->actualType ()->toString (true ) +
233+ (typeType ? typeType ->actualType () : decl-> type () )->toString (true ) +
235234 " ."
236235 );
237236 }
Original file line number Diff line number Diff line change 1+ contract A {
2+ function f () public virtual {}
3+ }
4+ contract B {
5+ function g () public {}
6+ }
7+ contract C is A ,B {
8+ function f () public override (g) {}
9+ }
10+
11+ // ----
12+ // TypeError 9301: (140-141): Expected contract but got function ().
You can’t perform that action at this time.
0 commit comments