mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
78 lines
3.7 KiB
Plaintext
78 lines
3.7 KiB
Plaintext
duplicateIdentifierEnum_A.ts(1,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_A.ts(4,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_A.ts(5,5): error TS2564: Property 'foo' has no initializer and is not definitely assigned in the constructor.
|
|
duplicateIdentifierEnum_A.ts(8,11): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_A.ts(11,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_A.ts(15,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_A.ts(18,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_A.ts(22,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_A.ts(25,7): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_A.ts(26,5): error TS2564: Property 'foo' has no initializer and is not definitely assigned in the constructor.
|
|
duplicateIdentifierEnum_B.ts(1,10): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
duplicateIdentifierEnum_B.ts(4,6): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
|
|
|
|
==== duplicateIdentifierEnum_A.ts (10 errors) ====
|
|
enum A {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
bar
|
|
}
|
|
class A {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
foo: number;
|
|
~~~
|
|
!!! error TS2564: Property 'foo' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
|
|
interface B {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
foo: number;
|
|
}
|
|
const enum B {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
bar
|
|
}
|
|
|
|
const enum C {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
|
|
}
|
|
function C() {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
return 0;
|
|
}
|
|
|
|
enum D {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
!!! related TS6203 duplicateIdentifierEnum_B.ts:1:10: 'D' was also declared here.
|
|
bar
|
|
}
|
|
class E {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
!!! related TS6203 duplicateIdentifierEnum_B.ts:4:6: 'E' was also declared here.
|
|
foo: number;
|
|
~~~
|
|
!!! error TS2564: Property 'foo' has no initializer and is not definitely assigned in the constructor.
|
|
}
|
|
// also make sure the error appears when trying to merge an enum in a separate file.
|
|
==== duplicateIdentifierEnum_B.ts (2 errors) ====
|
|
function D() {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
!!! related TS6203 duplicateIdentifierEnum_A.ts:22:6: 'D' was also declared here.
|
|
return 0;
|
|
}
|
|
enum E {
|
|
~
|
|
!!! error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
|
!!! related TS6203 duplicateIdentifierEnum_A.ts:25:7: 'E' was also declared here.
|
|
bar
|
|
} |