You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Numeric literals assignable to enum literals only when values match (#51561)
* Numeric literal assignable to enum literal only when values match
* Accept new baselines
* Update compiler sources
* Accept new baselines
* Fix test runner
* Any numeric literal type is assignable to a computed numeric enum type
ContextChecked=0x00000400,// Contextual types have been assigned
5621
-
MethodWithSuperPropertyAccessInAsync=0x00000800,// A method that contains a SuperProperty access in an async context.
5622
-
MethodWithSuperPropertyAssignmentInAsync=0x00001000,// A method that contains a SuperProperty assignment in an async context.
5623
-
CaptureArguments=0x00002000,// Lexical 'arguments' used in body
5624
-
EnumValuesComputed=0x00004000,// Values for enum members have been computed, and any errors have been reported for them.
5625
-
LexicalModuleMergesWithClass=0x00008000,// Instantiated lexical module declaration is merged with a previous class declaration.
5626
-
LoopWithCapturedBlockScopedBinding=0x00010000,// Loop that contains block scoped variable captured in closure
5627
-
ContainsCapturedBlockScopeBinding=0x00020000,// Part of a loop that contains block scoped variable captured in closure
5628
-
CapturedBlockScopedBinding=0x00040000,// Block-scoped binding that is captured in some function
5629
-
BlockScopedBindingInLoop=0x00080000,// Block-scoped binding with declaration nested inside iteration statement
5630
-
ClassWithBodyScopedClassBinding=0x00100000,// Decorated class that contains a binding to itself inside of the class body.
5631
-
BodyScopedClassBinding=0x00200000,// Binding to a decorated class inside of the class's body.
5632
-
NeedsLoopOutParameter=0x00400000,// Block scoped binding whose value should be explicitly copied outside of the converted loop
5633
-
AssignmentsMarked=0x00800000,// Parameter assignments have been marked
5634
-
ClassWithConstructorReference=0x01000000,// Class that contains a binding to its constructor inside of the class body.
5635
-
ConstructorReferenceInClass=0x02000000,// Binding to a class constructor inside of the class's body.
5636
-
ContainsClassWithPrivateIdentifiers=0x04000000,// Marked on all block-scoped containers containing a class with private identifiers.
5637
-
ContainsSuperPropertyInStaticInitializer=0x08000000,// Marked on all block-scoped containers containing a static initializer with 'super.x' or 'super[x]'.
5638
-
InCheckIdentifier=0x10000000,
5615
+
None=0,
5616
+
TypeChecked=1<<0,// Node has been type checked
5617
+
LexicalThis=1<<1,// Lexical 'this' reference
5618
+
CaptureThis=1<<2,// Lexical 'this' used in body
5619
+
CaptureNewTarget=1<<3,// Lexical 'new.target' used in body
5620
+
SuperInstance=1<<4,// Instance 'super' reference
5621
+
SuperStatic=1<<5,// Static 'super' reference
5622
+
ContextChecked=1<<6,// Contextual types have been assigned
5623
+
MethodWithSuperPropertyAccessInAsync=1<<7,// A method that contains a SuperProperty access in an async context.
5624
+
MethodWithSuperPropertyAssignmentInAsync=1<<8,// A method that contains a SuperProperty assignment in an async context.
5625
+
CaptureArguments=1<<9,// Lexical 'arguments' used in body
5626
+
EnumValuesComputed=1<<10,// Values for enum members have been computed, and any errors have been reported for them.
5627
+
LexicalModuleMergesWithClass=1<<11,// Instantiated lexical module declaration is merged with a previous class declaration.
5628
+
LoopWithCapturedBlockScopedBinding=1<<12,// Loop that contains block scoped variable captured in closure
5629
+
ContainsCapturedBlockScopeBinding=1<<13,// Part of a loop that contains block scoped variable captured in closure
5630
+
CapturedBlockScopedBinding=1<<14,// Block-scoped binding that is captured in some function
5631
+
BlockScopedBindingInLoop=1<<15,// Block-scoped binding with declaration nested inside iteration statement
5632
+
ClassWithBodyScopedClassBinding=1<<16,// Decorated class that contains a binding to itself inside of the class body.
5633
+
BodyScopedClassBinding=1<<17,// Binding to a decorated class inside of the class's body.
5634
+
NeedsLoopOutParameter=1<<18,// Block scoped binding whose value should be explicitly copied outside of the converted loop
5635
+
AssignmentsMarked=1<<19,// Parameter assignments have been marked
5636
+
ClassWithConstructorReference=1<<20,// Class that contains a binding to its constructor inside of the class body.
5637
+
ConstructorReferenceInClass=1<<21,// Binding to a class constructor inside of the class's body.
5638
+
ContainsClassWithPrivateIdentifiers=1<<22,// Marked on all block-scoped containers containing a class with private identifiers.
5639
+
ContainsSuperPropertyInStaticInitializer=1<<23,// Marked on all block-scoped containers containing a static initializer with 'super.x' or 'super[x]'.
5640
+
InCheckIdentifier=1<<24,
5639
5641
}
5640
5642
5641
5643
/** @internal */
@@ -5842,6 +5844,7 @@ export interface EnumType extends Type {
5842
5844
// are specific to certain types and reuse the same bit position. Those ObjectFlags require a check
5843
5845
// for a certain TypeFlags value to determine their meaning.
0 commit comments