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

Side by Side Diff: pkg/front_end/test/fasta/rasta/issue_000044.dart

Issue 2825063002: Move kernel baseline tests to front_end. (Closed)
Patch Set: Created 3 years, 8 months 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE.md file.
4
5 // Parse error: but the parser should recover and create something that looks
6 // like `a b(c) => d`.
7 a b(c) = d;
8
9 class C {
10 // Good constructor.
11 const C.constant();
12
13 // Bad constructor: missing factory keyword (and additional formals).
14 C.missingFactoryKeyword() = C.constant;
15
16 // Good redirecting const factory constructor.
17 const factory C.good() = C.constant;
18
19 // Parse error, the parser should recover and create a redirecting factory
20 // constructor body.
21 C notEvenAConstructor(a) = h;
22 }
23
24 main() {
25 C c = null;
26 print(const C.constant());
27 print(const C.missingFactoryKeyword());
28 print(const C.good());
29 print(new C.constant().notEvenAConstructor(null));
30 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698