260 lines
10 KiB
Text
260 lines
10 KiB
Text
=== tests/cases/compiler/escapedIdentifiers.ts ===
|
|
/*
|
|
0 .. \u0030
|
|
9 .. \u0039
|
|
|
|
A .. \u0041
|
|
Z .. \u005a
|
|
|
|
a .. \u0061
|
|
z .. \u00za
|
|
*/
|
|
|
|
// var decl
|
|
var \u0061 = 1;
|
|
>\u0061 : Symbol(\u0061, Decl(escapedIdentifiers.ts, 12, 3))
|
|
|
|
a ++;
|
|
>a : Symbol(\u0061, Decl(escapedIdentifiers.ts, 12, 3))
|
|
|
|
\u0061 ++;
|
|
>\u0061 : Symbol(\u0061, Decl(escapedIdentifiers.ts, 12, 3))
|
|
|
|
var b = 1;
|
|
>b : Symbol(b, Decl(escapedIdentifiers.ts, 16, 3))
|
|
|
|
b ++;
|
|
>b : Symbol(b, Decl(escapedIdentifiers.ts, 16, 3))
|
|
|
|
\u0062 ++;
|
|
>\u0062 : Symbol(b, Decl(escapedIdentifiers.ts, 16, 3))
|
|
|
|
// modules
|
|
module moduleType1 {
|
|
>moduleType1 : Symbol(moduleType1, Decl(escapedIdentifiers.ts, 18, 10))
|
|
|
|
export var baz1: number;
|
|
>baz1 : Symbol(baz1, Decl(escapedIdentifiers.ts, 22, 14))
|
|
}
|
|
module moduleType\u0032 {
|
|
>moduleType\u0032 : Symbol(moduleType\u0032, Decl(escapedIdentifiers.ts, 23, 1))
|
|
|
|
export var baz2: number;
|
|
>baz2 : Symbol(baz2, Decl(escapedIdentifiers.ts, 25, 14))
|
|
}
|
|
|
|
moduleType1.baz1 = 3;
|
|
>moduleType1.baz1 : Symbol(moduleType1.baz1, Decl(escapedIdentifiers.ts, 22, 14))
|
|
>moduleType1 : Symbol(moduleType1, Decl(escapedIdentifiers.ts, 18, 10))
|
|
>baz1 : Symbol(moduleType1.baz1, Decl(escapedIdentifiers.ts, 22, 14))
|
|
|
|
moduleType\u0031.baz1 = 3;
|
|
>moduleType\u0031.baz1 : Symbol(moduleType1.baz1, Decl(escapedIdentifiers.ts, 22, 14))
|
|
>moduleType\u0031 : Symbol(moduleType1, Decl(escapedIdentifiers.ts, 18, 10))
|
|
>baz1 : Symbol(moduleType1.baz1, Decl(escapedIdentifiers.ts, 22, 14))
|
|
|
|
moduleType2.baz2 = 3;
|
|
>moduleType2.baz2 : Symbol(moduleType\u0032.baz2, Decl(escapedIdentifiers.ts, 25, 14))
|
|
>moduleType2 : Symbol(moduleType\u0032, Decl(escapedIdentifiers.ts, 23, 1))
|
|
>baz2 : Symbol(moduleType\u0032.baz2, Decl(escapedIdentifiers.ts, 25, 14))
|
|
|
|
moduleType\u0032.baz2 = 3;
|
|
>moduleType\u0032.baz2 : Symbol(moduleType\u0032.baz2, Decl(escapedIdentifiers.ts, 25, 14))
|
|
>moduleType\u0032 : Symbol(moduleType\u0032, Decl(escapedIdentifiers.ts, 23, 1))
|
|
>baz2 : Symbol(moduleType\u0032.baz2, Decl(escapedIdentifiers.ts, 25, 14))
|
|
|
|
// classes
|
|
|
|
class classType1 {
|
|
>classType1 : Symbol(classType1, Decl(escapedIdentifiers.ts, 31, 26))
|
|
|
|
public foo1: number;
|
|
>foo1 : Symbol(foo1, Decl(escapedIdentifiers.ts, 35, 18))
|
|
}
|
|
class classType\u0032 {
|
|
>classType\u0032 : Symbol(classType\u0032, Decl(escapedIdentifiers.ts, 37, 1))
|
|
|
|
public foo2: number;
|
|
>foo2 : Symbol(foo2, Decl(escapedIdentifiers.ts, 38, 23))
|
|
}
|
|
|
|
var classType1Object1 = new classType1();
|
|
>classType1Object1 : Symbol(classType1Object1, Decl(escapedIdentifiers.ts, 42, 3))
|
|
>classType1 : Symbol(classType1, Decl(escapedIdentifiers.ts, 31, 26))
|
|
|
|
classType1Object1.foo1 = 2;
|
|
>classType1Object1.foo1 : Symbol(classType1.foo1, Decl(escapedIdentifiers.ts, 35, 18))
|
|
>classType1Object1 : Symbol(classType1Object1, Decl(escapedIdentifiers.ts, 42, 3))
|
|
>foo1 : Symbol(classType1.foo1, Decl(escapedIdentifiers.ts, 35, 18))
|
|
|
|
var classType1Object2 = new classType\u0031();
|
|
>classType1Object2 : Symbol(classType1Object2, Decl(escapedIdentifiers.ts, 44, 3))
|
|
>classType\u0031 : Symbol(classType1, Decl(escapedIdentifiers.ts, 31, 26))
|
|
|
|
classType1Object2.foo1 = 2;
|
|
>classType1Object2.foo1 : Symbol(classType1.foo1, Decl(escapedIdentifiers.ts, 35, 18))
|
|
>classType1Object2 : Symbol(classType1Object2, Decl(escapedIdentifiers.ts, 44, 3))
|
|
>foo1 : Symbol(classType1.foo1, Decl(escapedIdentifiers.ts, 35, 18))
|
|
|
|
var classType2Object1 = new classType2();
|
|
>classType2Object1 : Symbol(classType2Object1, Decl(escapedIdentifiers.ts, 46, 3))
|
|
>classType2 : Symbol(classType\u0032, Decl(escapedIdentifiers.ts, 37, 1))
|
|
|
|
classType2Object1.foo2 = 2;
|
|
>classType2Object1.foo2 : Symbol(classType\u0032.foo2, Decl(escapedIdentifiers.ts, 38, 23))
|
|
>classType2Object1 : Symbol(classType2Object1, Decl(escapedIdentifiers.ts, 46, 3))
|
|
>foo2 : Symbol(classType\u0032.foo2, Decl(escapedIdentifiers.ts, 38, 23))
|
|
|
|
var classType2Object2 = new classType\u0032();
|
|
>classType2Object2 : Symbol(classType2Object2, Decl(escapedIdentifiers.ts, 48, 3))
|
|
>classType\u0032 : Symbol(classType\u0032, Decl(escapedIdentifiers.ts, 37, 1))
|
|
|
|
classType2Object2.foo2 = 2;
|
|
>classType2Object2.foo2 : Symbol(classType\u0032.foo2, Decl(escapedIdentifiers.ts, 38, 23))
|
|
>classType2Object2 : Symbol(classType2Object2, Decl(escapedIdentifiers.ts, 48, 3))
|
|
>foo2 : Symbol(classType\u0032.foo2, Decl(escapedIdentifiers.ts, 38, 23))
|
|
|
|
// interfaces
|
|
interface interfaceType1 {
|
|
>interfaceType1 : Symbol(interfaceType1, Decl(escapedIdentifiers.ts, 49, 27))
|
|
|
|
bar1: number;
|
|
>bar1 : Symbol(bar1, Decl(escapedIdentifiers.ts, 52, 26))
|
|
}
|
|
interface interfaceType\u0032 {
|
|
>interfaceType\u0032 : Symbol(interfaceType\u0032, Decl(escapedIdentifiers.ts, 54, 1))
|
|
|
|
bar2: number;
|
|
>bar2 : Symbol(bar2, Decl(escapedIdentifiers.ts, 55, 31))
|
|
}
|
|
|
|
var interfaceType1Object1 = <interfaceType1>{ bar1: 0 };
|
|
>interfaceType1Object1 : Symbol(interfaceType1Object1, Decl(escapedIdentifiers.ts, 59, 3))
|
|
>interfaceType1 : Symbol(interfaceType1, Decl(escapedIdentifiers.ts, 49, 27))
|
|
>bar1 : Symbol(bar1, Decl(escapedIdentifiers.ts, 59, 45))
|
|
|
|
interfaceType1Object1.bar1 = 2;
|
|
>interfaceType1Object1.bar1 : Symbol(interfaceType1.bar1, Decl(escapedIdentifiers.ts, 52, 26))
|
|
>interfaceType1Object1 : Symbol(interfaceType1Object1, Decl(escapedIdentifiers.ts, 59, 3))
|
|
>bar1 : Symbol(interfaceType1.bar1, Decl(escapedIdentifiers.ts, 52, 26))
|
|
|
|
var interfaceType1Object2 = <interfaceType\u0031>{ bar1: 0 };
|
|
>interfaceType1Object2 : Symbol(interfaceType1Object2, Decl(escapedIdentifiers.ts, 61, 3))
|
|
>interfaceType\u0031 : Symbol(interfaceType1, Decl(escapedIdentifiers.ts, 49, 27))
|
|
>bar1 : Symbol(bar1, Decl(escapedIdentifiers.ts, 61, 50))
|
|
|
|
interfaceType1Object2.bar1 = 2;
|
|
>interfaceType1Object2.bar1 : Symbol(interfaceType1.bar1, Decl(escapedIdentifiers.ts, 52, 26))
|
|
>interfaceType1Object2 : Symbol(interfaceType1Object2, Decl(escapedIdentifiers.ts, 61, 3))
|
|
>bar1 : Symbol(interfaceType1.bar1, Decl(escapedIdentifiers.ts, 52, 26))
|
|
|
|
var interfaceType2Object1 = <interfaceType2>{ bar2: 0 };
|
|
>interfaceType2Object1 : Symbol(interfaceType2Object1, Decl(escapedIdentifiers.ts, 63, 3))
|
|
>interfaceType2 : Symbol(interfaceType\u0032, Decl(escapedIdentifiers.ts, 54, 1))
|
|
>bar2 : Symbol(bar2, Decl(escapedIdentifiers.ts, 63, 45))
|
|
|
|
interfaceType2Object1.bar2 = 2;
|
|
>interfaceType2Object1.bar2 : Symbol(interfaceType\u0032.bar2, Decl(escapedIdentifiers.ts, 55, 31))
|
|
>interfaceType2Object1 : Symbol(interfaceType2Object1, Decl(escapedIdentifiers.ts, 63, 3))
|
|
>bar2 : Symbol(interfaceType\u0032.bar2, Decl(escapedIdentifiers.ts, 55, 31))
|
|
|
|
var interfaceType2Object2 = <interfaceType\u0032>{ bar2: 0 };
|
|
>interfaceType2Object2 : Symbol(interfaceType2Object2, Decl(escapedIdentifiers.ts, 65, 3))
|
|
>interfaceType\u0032 : Symbol(interfaceType\u0032, Decl(escapedIdentifiers.ts, 54, 1))
|
|
>bar2 : Symbol(bar2, Decl(escapedIdentifiers.ts, 65, 50))
|
|
|
|
interfaceType2Object2.bar2 = 2;
|
|
>interfaceType2Object2.bar2 : Symbol(interfaceType\u0032.bar2, Decl(escapedIdentifiers.ts, 55, 31))
|
|
>interfaceType2Object2 : Symbol(interfaceType2Object2, Decl(escapedIdentifiers.ts, 65, 3))
|
|
>bar2 : Symbol(interfaceType\u0032.bar2, Decl(escapedIdentifiers.ts, 55, 31))
|
|
|
|
|
|
// arguments
|
|
class testClass {
|
|
>testClass : Symbol(testClass, Decl(escapedIdentifiers.ts, 66, 31))
|
|
|
|
public func(arg1: number, arg\u0032: string, arg\u0033: boolean, arg4: number) {
|
|
>func : Symbol(func, Decl(escapedIdentifiers.ts, 70, 17))
|
|
>arg1 : Symbol(arg1, Decl(escapedIdentifiers.ts, 71, 16))
|
|
>arg\u0032 : Symbol(arg\u0032, Decl(escapedIdentifiers.ts, 71, 29))
|
|
>arg\u0033 : Symbol(arg\u0033, Decl(escapedIdentifiers.ts, 71, 48))
|
|
>arg4 : Symbol(arg4, Decl(escapedIdentifiers.ts, 71, 68))
|
|
|
|
arg\u0031 = 1;
|
|
>arg\u0031 : Symbol(arg1, Decl(escapedIdentifiers.ts, 71, 16))
|
|
|
|
arg2 = 'string';
|
|
>arg2 : Symbol(arg\u0032, Decl(escapedIdentifiers.ts, 71, 29))
|
|
|
|
arg\u0033 = true;
|
|
>arg\u0033 : Symbol(arg\u0033, Decl(escapedIdentifiers.ts, 71, 48))
|
|
|
|
arg4 = 2;
|
|
>arg4 : Symbol(arg4, Decl(escapedIdentifiers.ts, 71, 68))
|
|
}
|
|
}
|
|
|
|
// constructors
|
|
class constructorTestClass {
|
|
>constructorTestClass : Symbol(constructorTestClass, Decl(escapedIdentifiers.ts, 77, 1))
|
|
|
|
constructor (public arg1: number,public arg\u0032: string,public arg\u0033: boolean,public arg4: number) {
|
|
>arg1 : Symbol(arg1, Decl(escapedIdentifiers.ts, 81, 17))
|
|
>arg\u0032 : Symbol(arg\u0032, Decl(escapedIdentifiers.ts, 81, 37))
|
|
>arg\u0033 : Symbol(arg\u0033, Decl(escapedIdentifiers.ts, 81, 62))
|
|
>arg4 : Symbol(arg4, Decl(escapedIdentifiers.ts, 81, 88))
|
|
}
|
|
}
|
|
var constructorTestObject = new constructorTestClass(1, 'string', true, 2);
|
|
>constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3))
|
|
>constructorTestClass : Symbol(constructorTestClass, Decl(escapedIdentifiers.ts, 77, 1))
|
|
|
|
constructorTestObject.arg\u0031 = 1;
|
|
>constructorTestObject.arg\u0031 : Symbol(constructorTestClass.arg1, Decl(escapedIdentifiers.ts, 81, 17))
|
|
>constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3))
|
|
>arg\u0031 : Symbol(constructorTestClass.arg1, Decl(escapedIdentifiers.ts, 81, 17))
|
|
|
|
constructorTestObject.arg2 = 'string';
|
|
>constructorTestObject.arg2 : Symbol(constructorTestClass.arg\u0032, Decl(escapedIdentifiers.ts, 81, 37))
|
|
>constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3))
|
|
>arg2 : Symbol(constructorTestClass.arg\u0032, Decl(escapedIdentifiers.ts, 81, 37))
|
|
|
|
constructorTestObject.arg\u0033 = true;
|
|
>constructorTestObject.arg\u0033 : Symbol(constructorTestClass.arg\u0033, Decl(escapedIdentifiers.ts, 81, 62))
|
|
>constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3))
|
|
>arg\u0033 : Symbol(constructorTestClass.arg\u0033, Decl(escapedIdentifiers.ts, 81, 62))
|
|
|
|
constructorTestObject.arg4 = 2;
|
|
>constructorTestObject.arg4 : Symbol(constructorTestClass.arg4, Decl(escapedIdentifiers.ts, 81, 88))
|
|
>constructorTestObject : Symbol(constructorTestObject, Decl(escapedIdentifiers.ts, 84, 3))
|
|
>arg4 : Symbol(constructorTestClass.arg4, Decl(escapedIdentifiers.ts, 81, 88))
|
|
|
|
// Lables
|
|
|
|
l\u0061bel1:
|
|
while (false)
|
|
{
|
|
while(false)
|
|
continue label1; // it will go to next iteration of outer loop
|
|
}
|
|
|
|
label2:
|
|
while (false)
|
|
{
|
|
while(false)
|
|
continue l\u0061bel2; // it will go to next iteration of outer loop
|
|
}
|
|
|
|
label3:
|
|
while (false)
|
|
{
|
|
while(false)
|
|
continue label3; // it will go to next iteration of outer loop
|
|
}
|
|
|
|
l\u0061bel4:
|
|
while (false)
|
|
{
|
|
while(false)
|
|
continue l\u0061bel4; // it will go to next iteration of outer loop
|
|
}
|