mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Fixed some of the baselines, made file comparisons handle different
casing, put diagnostic message in correct order
This commit is contained in:
parent
a12c35b69b
commit
93db897778
@ -5,8 +5,8 @@ module ts {
|
||||
Unterminated_string_literal: { code: 1002, category: DiagnosticCategory.Error, key: "Unterminated string literal." },
|
||||
Identifier_expected: { code: 1003, category: DiagnosticCategory.Error, key: "Identifier expected." },
|
||||
_0_expected: { code: 1005, category: DiagnosticCategory.Error, key: "'{0}' expected." },
|
||||
Trailing_comma_not_allowed: { code: 1009, category: DiagnosticCategory.Error, key: "Trailing comma not allowed." },
|
||||
A_file_cannot_have_a_reference_to_itself: { code: 1006, category: DiagnosticCategory.Error, key: "A file cannot have a reference to itself." },
|
||||
Trailing_comma_not_allowed: { code: 1009, category: DiagnosticCategory.Error, key: "Trailing comma not allowed." },
|
||||
Asterisk_Slash_expected: { code: 1010, category: DiagnosticCategory.Error, key: "'*/' expected." },
|
||||
Unexpected_token: { code: 1012, category: DiagnosticCategory.Error, key: "Unexpected token." },
|
||||
Catch_clause_parameter_cannot_have_a_type_annotation: { code: 1013, category: DiagnosticCategory.Error, key: "Catch clause parameter cannot have a type annotation." },
|
||||
|
||||
@ -10,15 +10,15 @@
|
||||
"'{0}' expected.": {
|
||||
"category": "Error",
|
||||
"code": 1005
|
||||
},
|
||||
"Trailing comma not allowed.": {
|
||||
"category": "Error",
|
||||
"code": 1009
|
||||
},
|
||||
"A file cannot have a reference to itself.": {
|
||||
"category": "Error",
|
||||
"code": 1006
|
||||
},
|
||||
"Trailing comma not allowed.": {
|
||||
"category": "Error",
|
||||
"code": 1009
|
||||
},
|
||||
"'*/' expected.": {
|
||||
"category": "Error",
|
||||
"code": 1010
|
||||
|
||||
@ -3833,7 +3833,7 @@ module ts {
|
||||
var referenceFilename = matchResult[3];
|
||||
var basePath = getDirectoryPath(file.filename);
|
||||
var referenceFullPath = normalizePath(combinePaths(basePath, referenceFilename));
|
||||
if (file.filename === referenceFullPath) {
|
||||
if (file.filename.toLocaleLowerCase() === referenceFullPath.toLocaleLowerCase()) {
|
||||
errorAtPos(start, length, Diagnostics.A_file_cannot_have_a_reference_to_itself);
|
||||
}
|
||||
else {
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
main.ts(1,1): error TS1006: A file cannot have a reference to itself.
|
||||
main.ts(2,1): error TS6053: File 'nonExistingFile1.ts' not found.
|
||||
main.ts(3,1): error TS6053: File 'nonExistingFile2.ts' not found.
|
||||
|
||||
|
||||
==== main.ts (2 errors) ====
|
||||
==== main.ts (3 errors) ====
|
||||
/// <reference path="main.ts" />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1006: A file cannot have a reference to itself.
|
||||
/// <reference path="nonExistingFile1.ts" />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS6053: File 'nonExistingFile1.ts' not found.
|
||||
/// <reference path="nonExistingFile2.ts" />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS6053: File 'nonExistingFile2.ts' not found.
|
||||
!!! error TS6053: File 'nonExistingFile2.ts' not found.
|
||||
|
||||
@ -1,12 +1,16 @@
|
||||
main.ts(1,1): error TS1006: A file cannot have a reference to itself.
|
||||
main.ts(2,1): error TS6053: File 'nonExistingFile1.ts' not found.
|
||||
main.ts(3,1): error TS6053: File 'nonExistingFile2.ts' not found.
|
||||
|
||||
|
||||
==== main.ts (2 errors) ====
|
||||
==== main.ts (3 errors) ====
|
||||
/// <reference path="main.ts" />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS1006: A file cannot have a reference to itself.
|
||||
/// <reference path="nonExistingFile1.ts" />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS6053: File 'nonExistingFile1.ts' not found.
|
||||
/// <reference path="nonExistingFile2.ts" />
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS6053: File 'nonExistingFile2.ts' not found.
|
||||
!!! error TS6053: File 'nonExistingFile2.ts' not found.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user