Commit 2267712
committed
Don't warn if impure expressions are passed to erased vals
`erased` is really the same thing as `lazy` or by-name. The semantics
implies it will not be evaluated. So it is pointless to warn if an impure
expression is passed to an erased val or parameter. Moreover, erased initializers
are often complex expressions - after all if they were not, why erase them
in the first place? These expressions are almost never recognized as pure given
the weak effect checking we currently have. So the warnings are issued
in the common case, which is bad.1 parent 71f3aca commit 2267712
1 file changed
+3
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
799 | 799 | | |
800 | 800 | | |
801 | 801 | | |
802 | | - | |
| 802 | + | |
803 | 803 | | |
804 | 804 | | |
805 | 805 | | |
| |||
1567 | 1567 | | |
1568 | 1568 | | |
1569 | 1569 | | |
1570 | | - | |
1571 | | - | |
1572 | | - | |
1573 | | - | |
1574 | | - | |
1575 | | - | |
1576 | | - | |
1577 | | - | |
1578 | | - | |
1579 | 1570 | | |
1580 | 1571 | | |
1581 | 1572 | | |
1582 | | - | |
1583 | | - | |
1584 | | - | |
1585 | | - | |
| 1573 | + | |
| 1574 | + | |
1586 | 1575 | | |
1587 | 1576 | | |
1588 | 1577 | | |
| |||
0 commit comments