Слияние кода завершено, страница обновится автоматически
Description:
enum A {
FIRST,
SECOND
}
function foo(x: A): void {
return
}
function bar(a: boolean) {
let x = a ? A.FIRST : A.SECOND
foo(x) // falls with TypeError: Type 'A|A' is not compatible with type 'A' at index 1 [abc.ets:12:9]
}
Error: TypeError: Type 'A|A' is not compatible with type 'A' at index 1
Вход Перед тем как оставить комментарий