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

Unified Diff: pkg/kernel/lib/transformations/insert_covariance_checks.dart

Issue 2718363003: Add source information to the covariance checks inserted for strong mode (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/kernel/lib/transformations/insert_covariance_checks.dart
diff --git a/pkg/kernel/lib/transformations/insert_covariance_checks.dart b/pkg/kernel/lib/transformations/insert_covariance_checks.dart
index 081dbfaf7192635eda934ba1ab3434e73f1b9d6d..7bc18bea8039ba590ca65ad1d38774b30d3b3860 100644
--- a/pkg/kernel/lib/transformations/insert_covariance_checks.dart
+++ b/pkg/kernel/lib/transformations/insert_covariance_checks.dart
@@ -377,7 +377,8 @@ class _ClassTransformer {
// function type parameters (in case the function is generic).
var targetType = cloneParameter.type;
cloneParameter.type = cloner.visitType(getSafeType(unsafeInputs));
- return new AsExpression(new VariableGet(cloneParameter), targetType);
+ return new AsExpression(new VariableGet(cloneParameter), targetType)
+ ..fileOffset = parameter.fileOffset;
}
// TODO: Insert checks for type parameter bounds.
@@ -416,7 +417,8 @@ class _ClassTransformer {
Expression argument = new VariableGet(parameter);
if (unsafeTypes != null) {
var castType = substitute(field.type, ownSubstitution);
- argument = new AsExpression(argument, castType);
+ argument = new AsExpression(argument, castType)
+ ..fileOffset = field.fileOffset;
var inputType = substitute(getSafeType(unsafeTypes), ownSubstitution);
parameter.type = inputType;
}
@@ -429,7 +431,8 @@ class _ClassTransformer {
var setter = new Procedure(
covariantCheckedName(field.name),
ProcedureKind.Setter,
- new FunctionNode(body, positionalParameters: [parameter]));
+ new FunctionNode(body, positionalParameters: [parameter]))
+ ..fileUri = field.fileUri;
host.addMember(setter);
if (field.enclosingClass == host) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698