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

Unified Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 2125793003: Serialize WarnOnUseElement (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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 | pkg/compiler/lib/src/serialization/element_serialization.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 6b7d3765d1998a207a7c1c24242046c35407c289..7cf6e1fdbcaf8280da8b37cb6e6f175607cfd360 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -452,7 +452,7 @@ class ErroneousConstructorElementX extends ErroneousElementX
class WrappedMessage {
/// The message position. If [:null:] the position of the reference to the
/// [WarnOnUseElementX] is used.
- final Spannable spannable;
+ final SourceSpan sourceSpan;
/**
* The message to report on resolving a wrapped element.
@@ -464,7 +464,7 @@ class WrappedMessage {
*/
final Map messageArguments;
- WrappedMessage(this.spannable, this.messageKind, this.messageArguments);
+ WrappedMessage(this.sourceSpan, this.messageKind, this.messageArguments);
}
class WarnOnUseElementX extends ElementX implements WarnOnUseElement {
@@ -477,21 +477,21 @@ class WarnOnUseElementX extends ElementX implements WarnOnUseElement {
/// The element whose usage cause a warning.
final Element wrappedElement;
- WarnOnUseElementX(WrappedMessage this.warning, WrappedMessage this.info,
- Element enclosingElement, Element wrappedElement)
+ WarnOnUseElementX(
+ this.warning, this.info, Element enclosingElement, Element wrappedElement)
: this.wrappedElement = wrappedElement,
super(wrappedElement.name, ElementKind.WARN_ON_USE, enclosingElement);
Element unwrap(DiagnosticReporter reporter, Spannable usageSpannable) {
var unwrapped = wrappedElement;
if (warning != null) {
- Spannable spannable = warning.spannable;
+ Spannable spannable = warning.sourceSpan;
if (spannable == null) spannable = usageSpannable;
DiagnosticMessage warningMessage = reporter.createMessage(
spannable, warning.messageKind, warning.messageArguments);
List<DiagnosticMessage> infos = <DiagnosticMessage>[];
if (info != null) {
- Spannable spannable = info.spannable;
+ Spannable spannable = info.sourceSpan;
if (spannable == null) spannable = usageSpannable;
infos.add(reporter.createMessage(
spannable, info.messageKind, info.messageArguments));
« no previous file with comments | « no previous file | pkg/compiler/lib/src/serialization/element_serialization.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698