From 14fa00791e053f1b5a23e20bb2eb7cc7a40e1517 Mon Sep 17 00:00:00 2001 From: vsavkin Date: Thu, 8 Oct 2015 11:12:17 -0700 Subject: [PATCH] fix(analyzer): fix dart analyzer errors --- modules/angular2/src/core/facade/exceptions.dart | 4 ++++ modules/angular2/src/core/linker/element_ref.ts | 3 +++ modules/angular2/test/core/linker/integration_spec.ts | 1 - modules/benchmarks/src/costs/index.ts | 1 - modules/benchmarks/src/largetable/largetable_benchmark.ts | 1 - modules/benchmarks/src/tree/tree_benchmark.ts | 1 - 6 files changed, 7 insertions(+), 4 deletions(-) diff --git a/modules/angular2/src/core/facade/exceptions.dart b/modules/angular2/src/core/facade/exceptions.dart index 6f3c1c0d26..8629dd65cb 100644 --- a/modules/angular2/src/core/facade/exceptions.dart +++ b/modules/angular2/src/core/facade/exceptions.dart @@ -30,3 +30,7 @@ class WrappedException extends Error { Error makeTypeError([String message = ""]) { return new BaseException(message); } + +dynamic unimplemented() { + throw new BaseException('unimplemented'); +} diff --git a/modules/angular2/src/core/linker/element_ref.ts b/modules/angular2/src/core/linker/element_ref.ts index df2635da03..2a0bd36bbe 100644 --- a/modules/angular2/src/core/linker/element_ref.ts +++ b/modules/angular2/src/core/linker/element_ref.ts @@ -66,5 +66,8 @@ export class ElementRef_ extends ElementRef { } get renderView(): RenderViewRef { return (this.parentView).render; } + set renderView(value) { + unimplemented(); + } get nativeElement(): any { return this._renderer.getNativeElementSync(this); } } diff --git a/modules/angular2/test/core/linker/integration_spec.ts b/modules/angular2/test/core/linker/integration_spec.ts index e3ba471bec..7410e2123a 100644 --- a/modules/angular2/test/core/linker/integration_spec.ts +++ b/modules/angular2/test/core/linker/integration_spec.ts @@ -90,7 +90,6 @@ import {TemplateRef} from 'angular2/src/core/linker/template_ref'; import {DomRenderer} from 'angular2/src/core/render/dom/dom_renderer'; import {IS_DART} from '../../platform'; -import {Compiler_} from "angular2/src/core/linker/compiler"; const ANCHOR_ELEMENT = CONST_EXPR(new OpaqueToken('AnchorElement')); diff --git a/modules/benchmarks/src/costs/index.ts b/modules/benchmarks/src/costs/index.ts index e180962401..7c8de8caea 100644 --- a/modules/benchmarks/src/costs/index.ts +++ b/modules/benchmarks/src/costs/index.ts @@ -11,7 +11,6 @@ import { import {LifeCycle} from 'angular2/src/core/life_cycle/life_cycle'; import {ListWrapper} from 'angular2/src/core/facade/collection'; import {getIntParameter, bindAction} from 'angular2/src/test_lib/benchmark_util'; -import {ComponentRef} from "angular2/src/core/linker/dynamic_component_loader"; var testList = null; diff --git a/modules/benchmarks/src/largetable/largetable_benchmark.ts b/modules/benchmarks/src/largetable/largetable_benchmark.ts index 3e6aa278ea..0c335e69f8 100644 --- a/modules/benchmarks/src/largetable/largetable_benchmark.ts +++ b/modules/benchmarks/src/largetable/largetable_benchmark.ts @@ -26,7 +26,6 @@ import {ListWrapper} from 'angular2/src/core/facade/collection'; import {Inject} from 'angular2/src/core/di/decorators'; import {reflector} from 'angular2/src/core/reflection/reflection'; -import {ComponentRef} from "angular2/src/core/linker/dynamic_component_loader"; export const BENCHMARK_TYPE = 'LargetableComponent.benchmarkType'; export const LARGETABLE_ROWS = 'LargetableComponent.rows'; diff --git a/modules/benchmarks/src/tree/tree_benchmark.ts b/modules/benchmarks/src/tree/tree_benchmark.ts index 8a9346df66..45662924b3 100644 --- a/modules/benchmarks/src/tree/tree_benchmark.ts +++ b/modules/benchmarks/src/tree/tree_benchmark.ts @@ -23,7 +23,6 @@ import { } from 'angular2/src/test_lib/benchmark_util'; import {BrowserDomAdapter} from 'angular2/src/core/dom/browser_adapter'; import {APP_VIEW_POOL_CAPACITY} from 'angular2/src/core/linker/view_pool'; -import {ComponentRef} from "angular2/src/core/linker/dynamic_component_loader"; function createBindings(): Binding[] { var viewCacheCapacity = getStringParameter('viewcache') == 'true' ? 10000 : 1;