mirror of
https://github.com/dlang/dmd.git
synced 2025-04-26 13:10:12 +03:00
This reverts commit fa1f860e4b
.
This commit is contained in:
parent
fa1f860e4b
commit
8dcef66a5f
7 changed files with 0 additions and 151 deletions
|
@ -1,38 +0,0 @@
|
|||
/*
|
||||
TEST_OUTPUT:
|
||||
---
|
||||
fail_compilation/powinline.d(25): Error: cannot implicitly convert expression `(a + 5.0) ^^ 2L` of type `double` to `int`
|
||||
fail_compilation/powinline.d(26): Error: cannot implicitly convert expression `(1.0 / foo()) ^^ 2L` of type `double` to `int`
|
||||
fail_compilation/powinline.d(31): Error: void has no value
|
||||
fail_compilation/powinline.d(31): Error: incompatible types for `(5.0) * (bar())`: `double` and `void`
|
||||
fail_compilation/powinline.d(37): Error: cannot modify `immutable` expression `a`
|
||||
---
|
||||
*/
|
||||
|
||||
double foo()
|
||||
{
|
||||
return 5.0;
|
||||
}
|
||||
|
||||
void bar()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
void test1()
|
||||
{
|
||||
double a = 2.0;
|
||||
int b = (a + 5.0) ^^ 2.0;
|
||||
b = (1 / foo()) ^^ 2.0;
|
||||
}
|
||||
|
||||
void test2()
|
||||
{
|
||||
double a = (5.0 * bar()) ^^ 2.0;
|
||||
}
|
||||
|
||||
void test3()
|
||||
{
|
||||
immutable double a = 3.0;
|
||||
(a ^^= 2.0) = 6;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue