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

Unified Diff: pkg/compiler/lib/src/ssa/builder_kernel.dart

Issue 2597303003: Fix type warning. (Closed)
Patch Set: Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder_kernel.dart
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index 9d7852c0a7ac661a9c0cfbc14e83e70900a7c596..1fc734fbda894d51b84ccc2690c7aa5bc998cf17 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -226,15 +226,15 @@ class KernelSsaBuilder extends ir.Visitor with GraphBuilder {
void _addClassTypeVariablesIfNeeded(ir.Member constructor) {
var enclosing = constructor.enclosingClass;
if (backend.classNeedsRti(astAdapter.getElement(enclosing))) {
+ ClassElement clsElement =
+ astAdapter.getElement(constructor).enclosingElement;
enclosing.typeParameters.forEach((ir.TypeParameter typeParameter) {
var typeParamElement = astAdapter.getElement(typeParameter);
HParameterValue param =
addParameter(typeParamElement, commonMasks.nonNullType);
- var dart_type = astAdapter.getDartType(typeParameter.bound);
// This is a little bit wacky (and n^2) until we make the localsHandler
// take Kernel DartTypes instead of just the AST DartTypes.
- var typeVariableType = (astAdapter.getElement(constructor))
- .enclosingElement
+ var typeVariableType = clsElement
.typeVariables
.firstWhere((TypeVariableType i) => i.name == typeParameter.name);
localsHandler.directLocals[
« 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