18 lines
No EOL
769 B
Text
18 lines
No EOL
769 B
Text
tests/cases/compiler/enumInitializersWithExponents.ts(5,5): error TS1066: Ambient enum elements can only have integer literal initializers.
|
|
tests/cases/compiler/enumInitializersWithExponents.ts(6,5): error TS1066: Ambient enum elements can only have integer literal initializers.
|
|
|
|
|
|
==== tests/cases/compiler/enumInitializersWithExponents.ts (2 errors) ====
|
|
// Must be integer literals.
|
|
declare enum E {
|
|
a = 1e3, // ok
|
|
b = 1e25, // ok
|
|
c = 1e-3, // error
|
|
~
|
|
!!! error TS1066: Ambient enum elements can only have integer literal initializers.
|
|
d = 1e-9, // error
|
|
~
|
|
!!! error TS1066: Ambient enum elements can only have integer literal initializers.
|
|
e = 1e0, // ok
|
|
f = 1e+25 // ok
|
|
} |