ir: Deal with name conflicts correctly in declaration type resolution.

So, basically, make opaque items last, and make previous names override
them.

Fixes #649
This commit is contained in:
Emilio Cobos Álvarez
2021-01-26 12:41:58 +01:00
parent c47ee1516b
commit 750745831a
15 changed files with 260 additions and 38 deletions
+14
View File
@@ -0,0 +1,14 @@
mod uhoh {
enum BindingType { Buffer, NotBuffer }
}
#[repr(u32)]
pub enum BindingType { Buffer = 0, NotBuffer = 1 }
#[repr(C)]
pub struct BindGroupLayoutEntry {
pub ty: BindingType, // This is the repr(u32) enum
}
#[no_mangle]
pub extern "C" fn root(entry: BindGroupLayoutEntry) {}