typescript-src 0.9.0 → 0.9.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -566,6 +566,7 @@ var TypeScript;
566
566
  DiagnosticCode[DiagnosticCode["Cannot_find_the_common_subdirectory_path_for_the_input_files"] = 273] = "Cannot_find_the_common_subdirectory_path_for_the_input_files";
567
567
  DiagnosticCode[DiagnosticCode["Cannot_compile_dynamic_modules_when_emitting_into_single_file"] = 274] = "Cannot_compile_dynamic_modules_when_emitting_into_single_file";
568
568
  DiagnosticCode[DiagnosticCode["Emit_Error__0"] = 275] = "Emit_Error__0";
569
+ DiagnosticCode[DiagnosticCode["Unsupported_encoding_for_file__0"] = 276] = "Unsupported_encoding_for_file__0";
569
570
  })(TypeScript.DiagnosticCode || (TypeScript.DiagnosticCode = {}));
570
571
  var DiagnosticCode = TypeScript.DiagnosticCode;
571
572
  })(TypeScript || (TypeScript = {}));
@@ -1951,6 +1952,11 @@ var TypeScript;
1951
1952
  category: 1 /* Error */,
1952
1953
  message: "Emit Error: {0}.",
1953
1954
  code: 5011
1955
+ },
1956
+ Unsupported_encoding_for_file__0: {
1957
+ category: 1 /* Error */,
1958
+ message: "Unsupported encoding for file: '{0}'.",
1959
+ code: 5013
1954
1960
  }
1955
1961
  };
1956
1962
 
@@ -2604,7 +2610,14 @@ var Environment = (function () {
2604
2610
  releaseStreamObject(streamObj);
2605
2611
  return new FileInformation(contents, byteOrderMark);
2606
2612
  } catch (err) {
2607
- throw new Error("Error reading file \"" + path + "\": " + err.message);
2613
+ var error = new Error(err.message);
2614
+
2615
+ var message;
2616
+ if (err.number === -2147024809) {
2617
+ error.isUnsupportedEncoding = true;
2618
+ }
2619
+
2620
+ throw error;
2608
2621
  }
2609
2622
  },
2610
2623
  writeFile: function (path, contents, writeByteOrderMark) {
@@ -30555,13 +30568,13 @@ var TypeScript;
30555
30568
  this.emitThis();
30556
30569
  this.writeToOutput(".");
30557
30570
  }
30558
- } else if (pullSymbolContainerKind === 4 /* Container */ || pullSymbolContainerKind === 64 /* Enum */ || pullSymbolContainer.hasFlag(32768 /* InitializedModule */ | 131072 /* InitializedEnum */)) {
30571
+ } else if (TypeScript.PullHelpers.symbolIsModule(pullSymbolContainer) || pullSymbolContainerKind === 64 /* Enum */ || pullSymbolContainer.hasFlag(32768 /* InitializedModule */ | 131072 /* InitializedEnum */)) {
30559
30572
  if (pullSymbolKind === 4096 /* Property */ || pullSymbolKind === 67108864 /* EnumMember */) {
30560
- this.writeToOutput(pullSymbolContainer.getName() + ".");
30573
+ this.writeToOutput(pullSymbolContainer.getDisplayName() + ".");
30561
30574
  } else if (pullSymbol.hasFlag(1 /* Exported */) && pullSymbolKind === 1024 /* Variable */ && !pullSymbol.hasFlag(32768 /* InitializedModule */ | 131072 /* InitializedEnum */)) {
30562
- this.writeToOutput(pullSymbolContainer.getName() + ".");
30575
+ this.writeToOutput(pullSymbolContainer.getDisplayName() + ".");
30563
30576
  } else if (pullSymbol.hasFlag(1 /* Exported */) && !this.symbolIsUsedInItsEnclosingContainer(pullSymbol)) {
30564
- this.writeToOutput(pullSymbolContainer.getName() + ".");
30577
+ this.writeToOutput(pullSymbolContainer.getDisplayName() + ".");
30565
30578
  }
30566
30579
  } else if (pullSymbolContainerKind === 32 /* DynamicModule */ || pullSymbolContainer.hasFlag(65536 /* InitializedDynamicModule */)) {
30567
30580
  if (pullSymbolKind === 4096 /* Property */) {
@@ -31537,17 +31550,28 @@ var TypeScript;
31537
31550
  try {
31538
31551
  resolvedFile.fileInformation = ioHost.readFile(normalizedPath);
31539
31552
  } catch (err1) {
31553
+ if (err1.isUnsupportedEncoding) {
31554
+ resolutionDispatcher.errorReporter.addDiagnostic(new TypeScript.Diagnostic(null, 0, 0, 276 /* Unsupported_encoding_for_file__0 */, [normalizedPath]));
31555
+ return;
31556
+ }
31557
+
31540
31558
  if (TypeScript.isTSFile(normalizedPath)) {
31541
31559
  normalizedPath = TypeScript.changePathToDTS(normalizedPath);
31542
31560
  TypeScript.CompilerDiagnostics.debugPrint(" Reading code from " + normalizedPath);
31543
31561
  resolvedFile.fileInformation = ioHost.readFile(normalizedPath);
31544
31562
  }
31545
31563
  }
31564
+
31546
31565
  TypeScript.CompilerDiagnostics.debugPrint(" Found code at " + normalizedPath);
31547
31566
 
31548
31567
  resolvedFile.path = normalizedPath;
31549
31568
  this.visited[absoluteModuleID] = true;
31550
31569
  } catch (err4) {
31570
+ if (err4.isUnsupportedEncoding) {
31571
+ resolutionDispatcher.errorReporter.addDiagnostic(new TypeScript.Diagnostic(null, 0, 0, 276 /* Unsupported_encoding_for_file__0 */, [normalizedPath]));
31572
+ return;
31573
+ }
31574
+
31551
31575
  TypeScript.CompilerDiagnostics.debugPrint(" Did not find code for " + referencePath);
31552
31576
 
31553
31577
  return false;
@@ -33987,6 +34011,21 @@ var TypeScript;
33987
34011
 
33988
34012
  return PullSymbol.getIsExternallyVisible(container, this, inIsExternallyVisibleSymbols);
33989
34013
  };
34014
+
34015
+ PullSymbol.prototype.isModule = function () {
34016
+ return this.getKind() == 4 /* Container */ || this.isOneDeclarationOfKind(4 /* Container */);
34017
+ };
34018
+
34019
+ PullSymbol.prototype.isOneDeclarationOfKind = function (kind) {
34020
+ var decls = this.getDeclarations();
34021
+ for (var i = 0; i < decls.length; i++) {
34022
+ if (decls[i].getKind() === kind) {
34023
+ return true;
34024
+ }
34025
+ }
34026
+
34027
+ return false;
34028
+ };
33990
34029
  return PullSymbol;
33991
34030
  })();
33992
34031
  TypeScript.PullSymbol = PullSymbol;
@@ -35454,7 +35493,7 @@ var TypeScript;
35454
35493
  typars = this.getTypeParameters();
35455
35494
  }
35456
35495
 
35457
- builder.add(PullSymbol.getTypeParameterStringEx(typars, this, getTypeParamMarkerInfo, useConstraintInName));
35496
+ builder.add(PullSymbol.getTypeParameterStringEx(typars, scopeSymbol, getTypeParamMarkerInfo, useConstraintInName));
35458
35497
 
35459
35498
  return builder;
35460
35499
  };
@@ -36642,6 +36681,11 @@ var TypeScript;
36642
36681
 
36643
36682
  prevSpecializationSignature = decl.getSpecializingSignatureSymbol();
36644
36683
  decl.setSpecializingSignatureSymbol(newSignature);
36684
+
36685
+ if (!(signature.isResolved() || signature.isResolving())) {
36686
+ resolver.resolveDeclaredSymbol(signature, enclosingDecl, new TypeScript.PullTypeResolutionContext());
36687
+ }
36688
+
36645
36689
  resolver.resolveAST(declAST, false, newTypeDecl, context);
36646
36690
  decl.setSpecializingSignatureSymbol(prevSpecializationSignature);
36647
36691
 
@@ -36704,6 +36748,11 @@ var TypeScript;
36704
36748
 
36705
36749
  prevSpecializationSignature = decl.getSpecializingSignatureSymbol();
36706
36750
  decl.setSpecializingSignatureSymbol(newSignature);
36751
+
36752
+ if (!(signature.isResolved() || signature.isResolving())) {
36753
+ resolver.resolveDeclaredSymbol(signature, enclosingDecl, new TypeScript.PullTypeResolutionContext());
36754
+ }
36755
+
36707
36756
  resolver.resolveAST(declAST, false, newTypeDecl, context);
36708
36757
  decl.setSpecializingSignatureSymbol(prevSpecializationSignature);
36709
36758
 
@@ -36766,6 +36815,11 @@ var TypeScript;
36766
36815
 
36767
36816
  prevSpecializationSignature = decl.getSpecializingSignatureSymbol();
36768
36817
  decl.setSpecializingSignatureSymbol(newSignature);
36818
+
36819
+ if (!(signature.isResolved() || signature.isResolving())) {
36820
+ resolver.resolveDeclaredSymbol(signature, enclosingDecl, new TypeScript.PullTypeResolutionContext());
36821
+ }
36822
+
36769
36823
  resolver.resolveAST(declAST, false, newTypeDecl, context);
36770
36824
  decl.setSpecializingSignatureSymbol(prevSpecializationSignature);
36771
36825
 
@@ -39123,6 +39177,9 @@ var TypeScript;
39123
39177
  }
39124
39178
  } else if (typeExprSymbol.isError()) {
39125
39179
  context.setTypeInContext(declSymbol, typeExprSymbol);
39180
+ if (declParameterSymbol) {
39181
+ context.setTypeInContext(declParameterSymbol, typeExprSymbol);
39182
+ }
39126
39183
  } else {
39127
39184
  if (typeExprSymbol.isNamedTypeSymbol() && typeExprSymbol.isGeneric() && !typeExprSymbol.isTypeParameter() && typeExprSymbol.isResolved() && !typeExprSymbol.getIsSpecialized() && typeExprSymbol.getTypeParameters().length && (typeExprSymbol.getTypeArguments() == null && !this.isArrayOrEquivalent(typeExprSymbol)) && this.isTypeRefWithoutTypeArgs(varDecl.typeExpr)) {
39128
39185
  context.postError(this.unitPath, varDecl.typeExpr.minChar, varDecl.typeExpr.getLength(), 239 /* Generic_type_references_must_include_all_type_arguments */, null, enclosingDecl, true);
@@ -39924,6 +39981,14 @@ var TypeScript;
39924
39981
  }
39925
39982
  }
39926
39983
 
39984
+ if (!nameSymbol) {
39985
+ nameSymbol = this.getSymbolFromDeclPath(id, declPath, 256 /* TypeAlias */);
39986
+
39987
+ if (nameSymbol && !nameSymbol.isAlias()) {
39988
+ nameSymbol = null;
39989
+ }
39990
+ }
39991
+
39927
39992
  if (!nameSymbol) {
39928
39993
  return SymbolAndDiagnostics.create(this.getNewErrorTypeSymbol(null, id), [context.postError(this.unitPath, nameAST.minChar, nameAST.getLength(), 164 /* Could_not_find_symbol__0_ */, [nameAST.actualText])]);
39929
39994
  }
@@ -40259,7 +40324,11 @@ var TypeScript;
40259
40324
  typeArg = this.specializeTypeToAny(typeArg, enclosingDecl, context);
40260
40325
  }
40261
40326
 
40262
- typeArgs[i] = context.findSpecializationForType(typeArg);
40327
+ if (!(typeArg.isTypeParameter() && (typeArg).isFunctionTypeParameter() && context.isSpecializingSignatureAtCallSite && !context.isSpecializingConstructorMethod)) {
40328
+ typeArgs[i] = context.findSpecializationForType(typeArg);
40329
+ } else {
40330
+ typeArgs[i] = typeArg;
40331
+ }
40263
40332
  }
40264
40333
  }
40265
40334
 
@@ -48198,6 +48267,14 @@ var TypeScript;
48198
48267
  }
48199
48268
 
48200
48269
  parent = parentDecl.getSymbol();
48270
+ if (parent) {
48271
+ var parentDeclKind = parentDecl.getKind();
48272
+ if (parentDeclKind == 262144 /* GetAccessor */) {
48273
+ parent = (parent).getGetter();
48274
+ } else if (parentDeclKind == 524288 /* SetAccessor */) {
48275
+ parent = (parent).getSetter();
48276
+ }
48277
+ }
48201
48278
 
48202
48279
  if (parent) {
48203
48280
  if (returnInstanceType && parent.isType() && parent.isContainer()) {
@@ -51313,6 +51390,22 @@ var TypeScript;
51313
51390
  return source && ((source.getKind() & (64 /* Enum */ | 67108864 /* EnumMember */)) || source.hasFlag(131072 /* InitializedEnum */));
51314
51391
  }
51315
51392
  PullHelpers.symbolIsEnum = symbolIsEnum;
51393
+
51394
+ function symbolIsModule(symbol) {
51395
+ return symbol.getKind() == 4 /* Container */ || isOneDeclarationOfKind(symbol, 4 /* Container */);
51396
+ }
51397
+ PullHelpers.symbolIsModule = symbolIsModule;
51398
+
51399
+ function isOneDeclarationOfKind(symbol, kind) {
51400
+ var decls = symbol.getDeclarations();
51401
+ for (var i = 0; i < decls.length; i++) {
51402
+ if (decls[i].getKind() === kind) {
51403
+ return true;
51404
+ }
51405
+ }
51406
+
51407
+ return false;
51408
+ }
51316
51409
  })(TypeScript.PullHelpers || (TypeScript.PullHelpers = {}));
51317
51410
  var PullHelpers = TypeScript.PullHelpers;
51318
51411
  })(TypeScript || (TypeScript = {}));
@@ -56269,7 +56362,7 @@ var BatchCompiler = (function () {
56269
56362
  this.ioHost = ioHost;
56270
56363
  this.resolvedEnvironment = null;
56271
56364
  this.hasResolveErrors = false;
56272
- this.compilerVersion = "0.9.0.0";
56365
+ this.compilerVersion = "0.9.0.1";
56273
56366
  this.printedVersion = false;
56274
56367
  this.errorReporter = null;
56275
56368
  this.compilationSettings = new TypeScript.CompilationSettings();
@@ -56311,7 +56404,13 @@ var BatchCompiler = (function () {
56311
56404
  var code = this.resolvedEnvironment.code[iCode];
56312
56405
 
56313
56406
  if (!this.compilationSettings.resolve) {
56314
- code.fileInformation = this.ioHost.readFile(code.path);
56407
+ try {
56408
+ code.fileInformation = this.ioHost.readFile(code.path);
56409
+ } catch (e) {
56410
+ if (e.isUnsupportedEncoding) {
56411
+ this.errorReporter.addDiagnostic(new TypeScript.Diagnostic(null, 0, 0, 276 /* Unsupported_encoding_for_file__0 */, [code.path]));
56412
+ }
56413
+ }
56315
56414
 
56316
56415
  if (this.compilationSettings.generateDeclarationFiles) {
56317
56416
  TypeScript.CompilerDiagnostics.assert(code.referencedFiles === null, "With no resolve option, referenced files need to null");
@@ -56402,7 +56501,13 @@ var BatchCompiler = (function () {
56402
56501
  this.ioHost.stdout.WriteLine("Consuming " + this.resolvedEnvironment.code[iCode].path + "...");
56403
56502
 
56404
56503
  if (!this.compilationSettings.resolve) {
56405
- code.fileInformation = this.ioHost.readFile(code.path);
56504
+ try {
56505
+ code.fileInformation = this.ioHost.readFile(code.path);
56506
+ } catch (e) {
56507
+ if (e.isUnsupportedEncoding) {
56508
+ this.errorReporter.addDiagnostic(new TypeScript.Diagnostic(null, 0, 0, 276 /* Unsupported_encoding_for_file__0 */, [code.path]));
56509
+ }
56510
+ }
56406
56511
 
56407
56512
  if (this.compilationSettings.generateDeclarationFiles) {
56408
56513
  TypeScript.CompilerDiagnostics.assert(code.referencedFiles === null, "With no resolve option, referenced files need to null");
@@ -566,6 +566,7 @@ var TypeScript;
566
566
  DiagnosticCode[DiagnosticCode["Cannot_find_the_common_subdirectory_path_for_the_input_files"] = 273] = "Cannot_find_the_common_subdirectory_path_for_the_input_files";
567
567
  DiagnosticCode[DiagnosticCode["Cannot_compile_dynamic_modules_when_emitting_into_single_file"] = 274] = "Cannot_compile_dynamic_modules_when_emitting_into_single_file";
568
568
  DiagnosticCode[DiagnosticCode["Emit_Error__0"] = 275] = "Emit_Error__0";
569
+ DiagnosticCode[DiagnosticCode["Unsupported_encoding_for_file__0"] = 276] = "Unsupported_encoding_for_file__0";
569
570
  })(TypeScript.DiagnosticCode || (TypeScript.DiagnosticCode = {}));
570
571
  var DiagnosticCode = TypeScript.DiagnosticCode;
571
572
  })(TypeScript || (TypeScript = {}));
@@ -1951,6 +1952,11 @@ var TypeScript;
1951
1952
  category: 1 /* Error */,
1952
1953
  message: "Emit Error: {0}.",
1953
1954
  code: 5011
1955
+ },
1956
+ Unsupported_encoding_for_file__0: {
1957
+ category: 1 /* Error */,
1958
+ message: "Unsupported encoding for file: '{0}'.",
1959
+ code: 5013
1954
1960
  }
1955
1961
  };
1956
1962
 
@@ -2604,7 +2610,14 @@ var Environment = (function () {
2604
2610
  releaseStreamObject(streamObj);
2605
2611
  return new FileInformation(contents, byteOrderMark);
2606
2612
  } catch (err) {
2607
- throw new Error("Error reading file \"" + path + "\": " + err.message);
2613
+ var error = new Error(err.message);
2614
+
2615
+ var message;
2616
+ if (err.number === -2147024809) {
2617
+ error.isUnsupportedEncoding = true;
2618
+ }
2619
+
2620
+ throw error;
2608
2621
  }
2609
2622
  },
2610
2623
  writeFile: function (path, contents, writeByteOrderMark) {
@@ -30555,13 +30568,13 @@ var TypeScript;
30555
30568
  this.emitThis();
30556
30569
  this.writeToOutput(".");
30557
30570
  }
30558
- } else if (pullSymbolContainerKind === 4 /* Container */ || pullSymbolContainerKind === 64 /* Enum */ || pullSymbolContainer.hasFlag(32768 /* InitializedModule */ | 131072 /* InitializedEnum */)) {
30571
+ } else if (TypeScript.PullHelpers.symbolIsModule(pullSymbolContainer) || pullSymbolContainerKind === 64 /* Enum */ || pullSymbolContainer.hasFlag(32768 /* InitializedModule */ | 131072 /* InitializedEnum */)) {
30559
30572
  if (pullSymbolKind === 4096 /* Property */ || pullSymbolKind === 67108864 /* EnumMember */) {
30560
- this.writeToOutput(pullSymbolContainer.getName() + ".");
30573
+ this.writeToOutput(pullSymbolContainer.getDisplayName() + ".");
30561
30574
  } else if (pullSymbol.hasFlag(1 /* Exported */) && pullSymbolKind === 1024 /* Variable */ && !pullSymbol.hasFlag(32768 /* InitializedModule */ | 131072 /* InitializedEnum */)) {
30562
- this.writeToOutput(pullSymbolContainer.getName() + ".");
30575
+ this.writeToOutput(pullSymbolContainer.getDisplayName() + ".");
30563
30576
  } else if (pullSymbol.hasFlag(1 /* Exported */) && !this.symbolIsUsedInItsEnclosingContainer(pullSymbol)) {
30564
- this.writeToOutput(pullSymbolContainer.getName() + ".");
30577
+ this.writeToOutput(pullSymbolContainer.getDisplayName() + ".");
30565
30578
  }
30566
30579
  } else if (pullSymbolContainerKind === 32 /* DynamicModule */ || pullSymbolContainer.hasFlag(65536 /* InitializedDynamicModule */)) {
30567
30580
  if (pullSymbolKind === 4096 /* Property */) {
@@ -31537,17 +31550,28 @@ var TypeScript;
31537
31550
  try {
31538
31551
  resolvedFile.fileInformation = ioHost.readFile(normalizedPath);
31539
31552
  } catch (err1) {
31553
+ if (err1.isUnsupportedEncoding) {
31554
+ resolutionDispatcher.errorReporter.addDiagnostic(new TypeScript.Diagnostic(null, 0, 0, 276 /* Unsupported_encoding_for_file__0 */, [normalizedPath]));
31555
+ return;
31556
+ }
31557
+
31540
31558
  if (TypeScript.isTSFile(normalizedPath)) {
31541
31559
  normalizedPath = TypeScript.changePathToDTS(normalizedPath);
31542
31560
  TypeScript.CompilerDiagnostics.debugPrint(" Reading code from " + normalizedPath);
31543
31561
  resolvedFile.fileInformation = ioHost.readFile(normalizedPath);
31544
31562
  }
31545
31563
  }
31564
+
31546
31565
  TypeScript.CompilerDiagnostics.debugPrint(" Found code at " + normalizedPath);
31547
31566
 
31548
31567
  resolvedFile.path = normalizedPath;
31549
31568
  this.visited[absoluteModuleID] = true;
31550
31569
  } catch (err4) {
31570
+ if (err4.isUnsupportedEncoding) {
31571
+ resolutionDispatcher.errorReporter.addDiagnostic(new TypeScript.Diagnostic(null, 0, 0, 276 /* Unsupported_encoding_for_file__0 */, [normalizedPath]));
31572
+ return;
31573
+ }
31574
+
31551
31575
  TypeScript.CompilerDiagnostics.debugPrint(" Did not find code for " + referencePath);
31552
31576
 
31553
31577
  return false;
@@ -33987,6 +34011,21 @@ var TypeScript;
33987
34011
 
33988
34012
  return PullSymbol.getIsExternallyVisible(container, this, inIsExternallyVisibleSymbols);
33989
34013
  };
34014
+
34015
+ PullSymbol.prototype.isModule = function () {
34016
+ return this.getKind() == 4 /* Container */ || this.isOneDeclarationOfKind(4 /* Container */);
34017
+ };
34018
+
34019
+ PullSymbol.prototype.isOneDeclarationOfKind = function (kind) {
34020
+ var decls = this.getDeclarations();
34021
+ for (var i = 0; i < decls.length; i++) {
34022
+ if (decls[i].getKind() === kind) {
34023
+ return true;
34024
+ }
34025
+ }
34026
+
34027
+ return false;
34028
+ };
33990
34029
  return PullSymbol;
33991
34030
  })();
33992
34031
  TypeScript.PullSymbol = PullSymbol;
@@ -35454,7 +35493,7 @@ var TypeScript;
35454
35493
  typars = this.getTypeParameters();
35455
35494
  }
35456
35495
 
35457
- builder.add(PullSymbol.getTypeParameterStringEx(typars, this, getTypeParamMarkerInfo, useConstraintInName));
35496
+ builder.add(PullSymbol.getTypeParameterStringEx(typars, scopeSymbol, getTypeParamMarkerInfo, useConstraintInName));
35458
35497
 
35459
35498
  return builder;
35460
35499
  };
@@ -36642,6 +36681,11 @@ var TypeScript;
36642
36681
 
36643
36682
  prevSpecializationSignature = decl.getSpecializingSignatureSymbol();
36644
36683
  decl.setSpecializingSignatureSymbol(newSignature);
36684
+
36685
+ if (!(signature.isResolved() || signature.isResolving())) {
36686
+ resolver.resolveDeclaredSymbol(signature, enclosingDecl, new TypeScript.PullTypeResolutionContext());
36687
+ }
36688
+
36645
36689
  resolver.resolveAST(declAST, false, newTypeDecl, context);
36646
36690
  decl.setSpecializingSignatureSymbol(prevSpecializationSignature);
36647
36691
 
@@ -36704,6 +36748,11 @@ var TypeScript;
36704
36748
 
36705
36749
  prevSpecializationSignature = decl.getSpecializingSignatureSymbol();
36706
36750
  decl.setSpecializingSignatureSymbol(newSignature);
36751
+
36752
+ if (!(signature.isResolved() || signature.isResolving())) {
36753
+ resolver.resolveDeclaredSymbol(signature, enclosingDecl, new TypeScript.PullTypeResolutionContext());
36754
+ }
36755
+
36707
36756
  resolver.resolveAST(declAST, false, newTypeDecl, context);
36708
36757
  decl.setSpecializingSignatureSymbol(prevSpecializationSignature);
36709
36758
 
@@ -36766,6 +36815,11 @@ var TypeScript;
36766
36815
 
36767
36816
  prevSpecializationSignature = decl.getSpecializingSignatureSymbol();
36768
36817
  decl.setSpecializingSignatureSymbol(newSignature);
36818
+
36819
+ if (!(signature.isResolved() || signature.isResolving())) {
36820
+ resolver.resolveDeclaredSymbol(signature, enclosingDecl, new TypeScript.PullTypeResolutionContext());
36821
+ }
36822
+
36769
36823
  resolver.resolveAST(declAST, false, newTypeDecl, context);
36770
36824
  decl.setSpecializingSignatureSymbol(prevSpecializationSignature);
36771
36825
 
@@ -39123,6 +39177,9 @@ var TypeScript;
39123
39177
  }
39124
39178
  } else if (typeExprSymbol.isError()) {
39125
39179
  context.setTypeInContext(declSymbol, typeExprSymbol);
39180
+ if (declParameterSymbol) {
39181
+ context.setTypeInContext(declParameterSymbol, typeExprSymbol);
39182
+ }
39126
39183
  } else {
39127
39184
  if (typeExprSymbol.isNamedTypeSymbol() && typeExprSymbol.isGeneric() && !typeExprSymbol.isTypeParameter() && typeExprSymbol.isResolved() && !typeExprSymbol.getIsSpecialized() && typeExprSymbol.getTypeParameters().length && (typeExprSymbol.getTypeArguments() == null && !this.isArrayOrEquivalent(typeExprSymbol)) && this.isTypeRefWithoutTypeArgs(varDecl.typeExpr)) {
39128
39185
  context.postError(this.unitPath, varDecl.typeExpr.minChar, varDecl.typeExpr.getLength(), 239 /* Generic_type_references_must_include_all_type_arguments */, null, enclosingDecl, true);
@@ -39924,6 +39981,14 @@ var TypeScript;
39924
39981
  }
39925
39982
  }
39926
39983
 
39984
+ if (!nameSymbol) {
39985
+ nameSymbol = this.getSymbolFromDeclPath(id, declPath, 256 /* TypeAlias */);
39986
+
39987
+ if (nameSymbol && !nameSymbol.isAlias()) {
39988
+ nameSymbol = null;
39989
+ }
39990
+ }
39991
+
39927
39992
  if (!nameSymbol) {
39928
39993
  return SymbolAndDiagnostics.create(this.getNewErrorTypeSymbol(null, id), [context.postError(this.unitPath, nameAST.minChar, nameAST.getLength(), 164 /* Could_not_find_symbol__0_ */, [nameAST.actualText])]);
39929
39994
  }
@@ -40259,7 +40324,11 @@ var TypeScript;
40259
40324
  typeArg = this.specializeTypeToAny(typeArg, enclosingDecl, context);
40260
40325
  }
40261
40326
 
40262
- typeArgs[i] = context.findSpecializationForType(typeArg);
40327
+ if (!(typeArg.isTypeParameter() && (typeArg).isFunctionTypeParameter() && context.isSpecializingSignatureAtCallSite && !context.isSpecializingConstructorMethod)) {
40328
+ typeArgs[i] = context.findSpecializationForType(typeArg);
40329
+ } else {
40330
+ typeArgs[i] = typeArg;
40331
+ }
40263
40332
  }
40264
40333
  }
40265
40334
 
@@ -48198,6 +48267,14 @@ var TypeScript;
48198
48267
  }
48199
48268
 
48200
48269
  parent = parentDecl.getSymbol();
48270
+ if (parent) {
48271
+ var parentDeclKind = parentDecl.getKind();
48272
+ if (parentDeclKind == 262144 /* GetAccessor */) {
48273
+ parent = (parent).getGetter();
48274
+ } else if (parentDeclKind == 524288 /* SetAccessor */) {
48275
+ parent = (parent).getSetter();
48276
+ }
48277
+ }
48201
48278
 
48202
48279
  if (parent) {
48203
48280
  if (returnInstanceType && parent.isType() && parent.isContainer()) {
@@ -51313,6 +51390,22 @@ var TypeScript;
51313
51390
  return source && ((source.getKind() & (64 /* Enum */ | 67108864 /* EnumMember */)) || source.hasFlag(131072 /* InitializedEnum */));
51314
51391
  }
51315
51392
  PullHelpers.symbolIsEnum = symbolIsEnum;
51393
+
51394
+ function symbolIsModule(symbol) {
51395
+ return symbol.getKind() == 4 /* Container */ || isOneDeclarationOfKind(symbol, 4 /* Container */);
51396
+ }
51397
+ PullHelpers.symbolIsModule = symbolIsModule;
51398
+
51399
+ function isOneDeclarationOfKind(symbol, kind) {
51400
+ var decls = symbol.getDeclarations();
51401
+ for (var i = 0; i < decls.length; i++) {
51402
+ if (decls[i].getKind() === kind) {
51403
+ return true;
51404
+ }
51405
+ }
51406
+
51407
+ return false;
51408
+ }
51316
51409
  })(TypeScript.PullHelpers || (TypeScript.PullHelpers = {}));
51317
51410
  var PullHelpers = TypeScript.PullHelpers;
51318
51411
  })(TypeScript || (TypeScript = {}));
@@ -8,5 +8,5 @@ Gem::Specification.new do |gem|
8
8
 
9
9
  gem.files = `git ls-files`.split($\)
10
10
  gem.name = "typescript-src"
11
- gem.version = "0.9.0"
11
+ gem.version = "0.9.0.1"
12
12
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: typescript-src
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-20 00:00:00.000000000 Z
12
+ date: 2013-07-23 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: TypeScript source
15
15
  email:
@@ -43,7 +43,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
43
43
  version: '0'
44
44
  segments:
45
45
  - 0
46
- hash: 3653402291613977659
46
+ hash: 2884048879664608726
47
47
  required_rubygems_version: !ruby/object:Gem::Requirement
48
48
  none: false
49
49
  requirements:
@@ -52,10 +52,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
52
52
  version: '0'
53
53
  segments:
54
54
  - 0
55
- hash: 3653402291613977659
55
+ hash: 2884048879664608726
56
56
  requirements: []
57
57
  rubyforge_project:
58
- rubygems_version: 1.8.24
58
+ rubygems_version: 1.8.25
59
59
  signing_key:
60
60
  specification_version: 3
61
61
  summary: TypeScript source files