We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
shadowing_predeclared_types
1 parent 0586f7b commit 4d96068Copy full SHA for 4d96068
naga/src/front/wgsl/tests.rs
@@ -631,6 +631,36 @@ fn parse_alias() {
631
.unwrap();
632
}
633
634
+#[test]
635
+fn shadowing_predeclared_types() {
636
+ parse_str(
637
+ "
638
+ fn test(f32: vec2f) -> vec2f { return f32; }
639
+ ",
640
+ )
641
+ .unwrap();
642
643
644
+ fn test(vec2: vec2f) -> vec2f { return vec2; }
645
646
647
648
649
650
+ alias vec2f = vec2u;
651
+ fn test(v: vec2f) -> vec2u { return v; }
652
653
654
655
656
657
+ struct vec2f { inner: vec2<f32> };
658
+ fn test(v: vec2f) -> vec2<f32> { return v.inner; }
659
660
661
662
+}
663
+
664
#[test]
665
fn parse_texture_load_store_expecting_four_args() {
666
for (func, texture) in [
0 commit comments