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

Side by Side Diff: pkg/front_end/lib/src/fasta/kernel/kernel_function_type_builder.dart

Issue 2986393002: Record Typedef reference into Kernel FunctionType and resynthesyze typedefs in Analyzer. (Closed)
Patch Set: Drop @informative for typedefReference. Created 3 years, 4 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
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 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 file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library fasta.kernel_function_type_builder; 5 library fasta.kernel_function_type_builder;
6 6
7 import 'package:kernel/ast.dart' 7 import 'package:kernel/ast.dart'
8 show 8 show
9 DartType, 9 DartType,
10 DynamicType, 10 DynamicType,
(...skipping 19 matching lines...) Expand all
30 final int charOffset; 30 final int charOffset;
31 31
32 KernelFunctionTypeBuilder( 32 KernelFunctionTypeBuilder(
33 this.charOffset, 33 this.charOffset,
34 Uri fileUri, 34 Uri fileUri,
35 KernelTypeBuilder returnType, 35 KernelTypeBuilder returnType,
36 List<TypeVariableBuilder> typeVariables, 36 List<TypeVariableBuilder> typeVariables,
37 List<FormalParameterBuilder> formals) 37 List<FormalParameterBuilder> formals)
38 : super(charOffset, fileUri, returnType, typeVariables, formals); 38 : super(charOffset, fileUri, returnType, typeVariables, formals);
39 39
40 DartType build(LibraryBuilder library) { 40 FunctionType build(LibraryBuilder library) {
41 DartType builtReturnType = 41 DartType builtReturnType =
42 returnType?.build(library) ?? const DynamicType(); 42 returnType?.build(library) ?? const DynamicType();
43 List<DartType> positionalParameters = <DartType>[]; 43 List<DartType> positionalParameters = <DartType>[];
44 List<String> positionalParameterNames = <String>[]; 44 List<String> positionalParameterNames = <String>[];
45 List<NamedType> namedParameters; 45 List<NamedType> namedParameters;
46 int requiredParameterCount = 0; 46 int requiredParameterCount = 0;
47 if (formals != null) { 47 if (formals != null) {
48 for (KernelFormalParameterBuilder formal in formals) { 48 for (KernelFormalParameterBuilder formal in formals) {
49 DartType type = formal.type?.build(library) ?? const DynamicType(); 49 DartType type = formal.type?.build(library) ?? const DynamicType();
50 if (formal.isPositional) { 50 if (formal.isPositional) {
(...skipping 22 matching lines...) Expand all
73 requiredParameterCount: requiredParameterCount, 73 requiredParameterCount: requiredParameterCount,
74 positionalParameterNames: positionalParameterNames); 74 positionalParameterNames: positionalParameterNames);
75 } 75 }
76 76
77 Supertype buildSupertype(LibraryBuilder library) { 77 Supertype buildSupertype(LibraryBuilder library) {
78 library.addCompileTimeError( 78 library.addCompileTimeError(
79 messageSupertypeIsFunction, charOffset, fileUri); 79 messageSupertypeIsFunction, charOffset, fileUri);
80 return null; 80 return null;
81 } 81 }
82 } 82 }
OLDNEW
« no previous file with comments | « pkg/front_end/lib/src/fasta/kernel/kernel_function_type_alias_builder.dart ('k') | pkg/kernel/lib/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698