From 5a7a58b1e0651d34a3ae47933dc560f518531ef0 Mon Sep 17 00:00:00 2001 From: Tobias Bosch Date: Mon, 24 Oct 2016 16:57:23 -0700 Subject: [PATCH] refactor(compiler): make arguments in `InlineArray` optional. --- modules/@angular/core/src/linker/view_utils.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/@angular/core/src/linker/view_utils.ts b/modules/@angular/core/src/linker/view_utils.ts index 65f9c836fc..c2ee91985d 100644 --- a/modules/@angular/core/src/linker/view_utils.ts +++ b/modules/@angular/core/src/linker/view_utils.ts @@ -411,7 +411,7 @@ class InlineArray0 implements InlineArray { } export class InlineArray2 implements InlineArray { - constructor(public length: number, private _v0: T, private _v1: T) {} + constructor(public length: number, private _v0?: T, private _v1?: T) {} get(index: number) { switch (index) { case 0: @@ -426,7 +426,7 @@ export class InlineArray2 implements InlineArray { export class InlineArray4 implements InlineArray { constructor( - public length: number, private _v0: T, private _v1: T, private _v2: T, private _v3: T) {} + public length: number, private _v0?: T, private _v1?: T, private _v2?: T, private _v3?: T) {} get(index: number) { switch (index) { case 0: @@ -445,8 +445,8 @@ export class InlineArray4 implements InlineArray { export class InlineArray8 implements InlineArray { constructor( - public length: number, private _v0: T, private _v1: T, private _v2: T, private _v3: T, - private _v4: T, private _v5: T, private _v6: T, private _v7: T) {} + public length: number, private _v0?: T, private _v1?: T, private _v2?: T, private _v3?: T, + private _v4?: T, private _v5?: T, private _v6?: T, private _v7?: T) {} get(index: number) { switch (index) { case 0: @@ -473,10 +473,10 @@ export class InlineArray8 implements InlineArray { export class InlineArray16 implements InlineArray { constructor( - public length: number, private _v0: T, private _v1: T, private _v2: T, private _v3: T, - private _v4: T, private _v5: T, private _v6: T, private _v7: T, private _v8: T, - private _v9: T, private _v10: T, private _v11: T, private _v12: T, private _v13: T, - private _v14: T, private _v15: T) {} + public length: number, private _v0?: T, private _v1?: T, private _v2?: T, private _v3?: T, + private _v4?: T, private _v5?: T, private _v6?: T, private _v7?: T, private _v8?: T, + private _v9?: T, private _v10?: T, private _v11?: T, private _v12?: T, private _v13?: T, + private _v14?: T, private _v15?: T) {} get(index: number) { switch (index) { case 0: