cli: reject non-value operands without aborting lowering
This commit is contained in:
1 parent
bc5412dadd
commit
dcd5f1f702
83 files changed
+1042
-38
No files matched your search
@@ -0,0 +1,11 @@
|
||||
// expect: reject E7005
|
||||
// phase: 6
|
||||
// spec: docs/spec/15-source-language.md §10
|
||||
module test.nonvalue_operands
|
||||
fn stop() -> never effects [] { trap; }
|
||||
fn nothing() -> void effects [] {}
|
||||
fn take(x: u64) -> u64 effects [] { return x; }
|
||||
fn two(x: u64, y: u64) -> u64 effects [] { return x + y; }
|
||||
struct Pair { a: u64, b: u64 }
|
||||
enum Choice { Some(u64), None }
|
||||
fn main() -> u64 effects [] { let x = Pair { b: missing, a: stop() }; return 42; }
|
||||
Reference in new issue
Block a user