mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-26 00:36:29 -05:00
Merge branch 'master' into fixCircularReturnType
# Conflicts: # src/compiler/diagnosticMessages.json
This commit is contained in:
15
tests/cases/compiler/classStaticPropertyAccess.ts
Normal file
15
tests/cases/compiler/classStaticPropertyAccess.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// @strict: true
|
||||
// @target: ES5
|
||||
|
||||
class A {
|
||||
public static x: number = 1;
|
||||
public static y: number = 1;
|
||||
private static _b: number = 2;
|
||||
}
|
||||
|
||||
const a = new A();
|
||||
|
||||
a['y'] // Error
|
||||
a.y // Error
|
||||
A._b // Error
|
||||
A.a
|
||||
@@ -1,5 +1,4 @@
|
||||
/// <reference path='fourslash.ts' />
|
||||
|
||||
// @allowJs: true
|
||||
// @checkJs: true
|
||||
|
||||
@@ -15,7 +14,6 @@
|
||||
// @Filename: f1.ts
|
||||
//// export class C {[|
|
||||
//// |]x: number;
|
||||
//// static y: string;
|
||||
//// }
|
||||
|
||||
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
|
||||
|
||||
Reference in New Issue
Block a user