Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Unified Diff: runtime/vm/parser.cc

Issue 102443008: Detect missing with clause in mixing applications (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/language/mixin_illegal_syntax_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/parser.cc
===================================================================
--- runtime/vm/parser.cc (revision 31369)
+++ runtime/vm/parser.cc (working copy)
@@ -3910,13 +3910,16 @@
String::Handle(super_type.UserVisibleName()).ToCString());
}
// The class finalizer will check whether the super type is malbounded.
- if (CurrentToken() == Token::kWITH) {
- super_type = ParseMixins(super_type);
- }
if (is_mixin_declaration) {
+ if (CurrentToken() != Token::kWITH) {
+ ErrorMsg("mixin application clause 'with type' expected");
+ }
cls.set_is_mixin_app_alias();
cls.set_is_synthesized_class();
}
+ if (CurrentToken() == Token::kWITH) {
+ super_type = ParseMixins(super_type);
+ }
} else {
// No extends clause: implicitly extend Object, unless Object itself.
if (!cls.IsObjectClass()) {
« no previous file with comments | « no previous file | tests/language/mixin_illegal_syntax_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698