Merge pull request #4088 from Microsoft/fixup3935

Fix up #3935
This commit is contained in:
Daniel Rosenwasser
2015-07-31 00:30:02 -04:00
6 changed files with 28 additions and 29 deletions

View File

@@ -4867,9 +4867,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
}
function emitSerializedTypeNode(node: TypeNode) {
if(!node) {
return; //don't write anything on the stream when type is not defined
if (!node) {
return;
}
switch (node.kind) {

View File

@@ -1,4 +1,4 @@
//// [emitVoid0ReturnType.ts]
//// [decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts]
declare var decorator: any;
@@ -14,7 +14,7 @@ class MyClass {
}
//// [emitVoid0ReturnType.js]
//// [decoratorMetadataForMethodWithNoReturnTypeAnnotation01.js]
var MyClass = (function () {
function MyClass(test, test2) {
}

View File

@@ -0,0 +1,23 @@
=== tests/cases/compiler/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts ===
declare var decorator: any;
>decorator : Symbol(decorator, Decl(decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts, 1, 11))
class MyClass {
>MyClass : Symbol(MyClass, Decl(decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts, 1, 27))
constructor(test: string, test2: number) {
>test : Symbol(test, Decl(decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts, 4, 16))
>test2 : Symbol(test2, Decl(decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts, 4, 29))
}
@decorator
>decorator : Symbol(decorator, Decl(decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts, 1, 11))
doSomething() {
>doSomething : Symbol(doSomething, Decl(decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts, 6, 5))
}
}

View File

@@ -1,4 +1,4 @@
=== tests/cases/compiler/emitVoid0ReturnType.ts ===
=== tests/cases/compiler/decoratorMetadataForMethodWithNoReturnTypeAnnotation01.ts ===
declare var decorator: any;
>decorator : any

View File

@@ -1,23 +0,0 @@
=== tests/cases/compiler/emitVoid0ReturnType.ts ===
declare var decorator: any;
>decorator : Symbol(decorator, Decl(emitVoid0ReturnType.ts, 1, 11))
class MyClass {
>MyClass : Symbol(MyClass, Decl(emitVoid0ReturnType.ts, 1, 27))
constructor(test: string, test2: number) {
>test : Symbol(test, Decl(emitVoid0ReturnType.ts, 4, 16))
>test2 : Symbol(test2, Decl(emitVoid0ReturnType.ts, 4, 29))
}
@decorator
>decorator : Symbol(decorator, Decl(emitVoid0ReturnType.ts, 1, 11))
doSomething() {
>doSomething : Symbol(doSomething, Decl(emitVoid0ReturnType.ts, 6, 5))
}
}