2018-11-30 01:43:50 -06:00
|
|
|
const fn foo() { (||{})() }
|
2022-09-21 10:02:15 -05:00
|
|
|
//~^ ERROR cannot call non-const closure
|
2018-11-30 01:43:50 -06:00
|
|
|
|
|
|
|
const fn bad(input: fn()) {
|
|
|
|
input()
|
2022-09-21 10:02:15 -05:00
|
|
|
//~^ ERROR function pointer calls are not allowed
|
2018-11-30 01:43:50 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|