-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(44273): preserves 'override' modifier in JavaScript output
- Loading branch information
1 parent
5fde871
commit dac7fdb
Showing
5 changed files
with
61 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
//// [override16.ts] | ||
class A { | ||
foo?: string; | ||
} | ||
|
||
class B extends A { | ||
override foo = "string"; | ||
} | ||
|
||
|
||
//// [override16.js] | ||
class A { | ||
foo; | ||
} | ||
class B extends A { | ||
foo = "string"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
=== tests/cases/conformance/override/override16.ts === | ||
class A { | ||
>A : Symbol(A, Decl(override16.ts, 0, 0)) | ||
|
||
foo?: string; | ||
>foo : Symbol(A.foo, Decl(override16.ts, 0, 9)) | ||
} | ||
|
||
class B extends A { | ||
>B : Symbol(B, Decl(override16.ts, 2, 1)) | ||
>A : Symbol(A, Decl(override16.ts, 0, 0)) | ||
|
||
override foo = "string"; | ||
>foo : Symbol(B.foo, Decl(override16.ts, 4, 19)) | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
=== tests/cases/conformance/override/override16.ts === | ||
class A { | ||
>A : A | ||
|
||
foo?: string; | ||
>foo : string | ||
} | ||
|
||
class B extends A { | ||
>B : B | ||
>A : A | ||
|
||
override foo = "string"; | ||
>foo : string | ||
>"string" : "string" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// @target: esnext | ||
// @noImplicitOverride: true | ||
|
||
class A { | ||
foo?: string; | ||
} | ||
|
||
class B extends A { | ||
override foo = "string"; | ||
} |