dmd/compiler/test/fail_compilation/enum_function.d
Nick Treleaven b677368227 [stable] Make enum function a deprecation, not an error (#15533)
[stable] Make enum function a deprecation, not an error

Signed-off-by: Dennis <dkorpel@users.noreply.github.com>
Signed-off-by: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
Signed-off-by: Petar Kirov <PetarKirov@users.noreply.github.com>
Merged-on-behalf-of: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
2023-08-15 23:23:08 +01:00

14 lines
499 B
D

/*
REQUIRED_ARGS: -de
TEST_OUTPUT:
---
fail_compilation/enum_function.d(11): Deprecation: function cannot have enum storage class
fail_compilation/enum_function.d(12): Deprecation: function cannot have enum storage class
fail_compilation/enum_function.d(13): Deprecation: function cannot have enum storage class
fail_compilation/enum_function.d(14): Deprecation: function cannot have enum storage class
---
*/
enum void f1() { return; }
enum f2() { return 5; }
enum f3() => 5;
enum int f4()() => 5;