Fork of daniellemaywood.uk/gleam — Wasm codegen work
2

Configure Feed

Select the types of activity you want to include in your feed.

Add reference to value in BitArray option `size`

+31
+5
compiler-core/src/call_graph.rs
··· 232 232 UntypedExpr::BitArray { segments, .. } => { 233 233 for segment in segments { 234 234 self.expression(&segment.value); 235 + for option in &segment.options { 236 + if let BitArrayOption::Size { value, .. } = option { 237 + self.expression(value); 238 + } 239 + } 235 240 } 236 241 } 237 242
+12
compiler-core/src/erlang/tests/bit_arrays.rs
··· 78 78 } 79 79 80 80 #[test] 81 + fn bit_array5() { 82 + assert_erl!( 83 + r#"const bit_size = 8 84 + pub fn main() { 85 + let a = <<10:size(bit_size)>> 86 + a 87 + } 88 + "# 89 + ); 90 + } 91 + 92 + #[test] 81 93 fn bit_array_discard() { 82 94 // https://github.com/gleam-lang/gleam/issues/704 83 95
+14
compiler-core/src/erlang/tests/snapshots/gleam_core__erlang__tests__bit_arrays__bit_array5.snap
··· 1 + --- 2 + source: compiler-core/src/erlang/tests/bit_arrays.rs 3 + assertion_line: 82 4 + expression: "const bit_size = 8\npub fn main() {\n let a = <<10:size(bit_size)>>\n a\n}\n" 5 + --- 6 + -module(my@mod). 7 + -compile([no_auto_import, nowarn_unused_vars, nowarn_unused_function, nowarn_nomatch]). 8 + 9 + -export([main/0]). 10 + 11 + -spec main() -> bitstring(). 12 + main() -> 13 + A = <<10:(lists:max([(8), 0]))>>, 14 + A.