pascalabcnet/TestSuite/ifexpr_in_newclass.pas
Mikhalkovich Stanislav 2ecc622a3f fix #2617
2022-01-29 18:30:35 +03:00

5 lines
270 B
ObjectPascal
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

##
var a := new class(x := true?1:2); //Ошибка: Встречено '?', а ожидалось '='
var b := new class(x := if true then 1 else 2); //Ошибка: Встречено 'if', а ожидалось выражение
Assert(a.x = 1);
Assert(b.x = 1);