dmd/compiler/test/fail_compilation/ice10599.d
Iain Buclaw a6f1083699 test: Reorganize the unicode tests so those with BOMs are identifiable by name
- Many tests needlessly had a UTF-8 BOM, these have been removed.
- compilable/ddoc12.d has been renamed to compilable/ddoc_bom_UTF8.d.
- runnable/*UTF*.d tests have been renamed to runnable/bom_UTF*.d.
- The 'helloUTF8.d' test didn't have a UTF-8 BOM, this has been added.
2024-02-03 11:14:15 +01:00

21 lines
480 B
D

// https://issues.dlang.org/show_bug.cgi?id=10599
// ICE(interpret.c)
/*
TEST_OUTPUT:
---
fail_compilation/ice10599.d(13): Error: cannot implicitly convert expression `3.45` of type `double` to `int`
fail_compilation/ice10599.d(21): called from here: `bug10599()`
fail_compilation/ice10599.d(21): while evaluating: `static assert(bug10599())`
---
*/
struct Bug {
int val = 3.45;
}
int bug10599()
{
Bug p = Bug();
return 1;
}
static assert(bug10599());