summaryrefslogtreecommitdiffstats
path: root/tests/parser
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2022-08-24 10:56:53 -0700
committerGitHub <noreply@github.com>2022-08-24 10:56:53 -0700
commitd245c72f2a92a74ccda83f41758c1948ae5132d3 (patch)
treef036e1f2afb7febe2de9b09990bcde6c04f3bad1 /tests/parser
parent0b808453407f8feef8574cae99afd90771712185 (diff)
Compiler time evaluation of all int and bool operators. (#2376)
* Compiler time evaluation of all int and bool operators. * Fix linux compile error. * Fix. Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/generic-arg.slang15
-rw-r--r--tests/parser/generic-arg.slang.expected5
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/parser/generic-arg.slang b/tests/parser/generic-arg.slang
new file mode 100644
index 000000000..6917ad4db
--- /dev/null
+++ b/tests/parser/generic-arg.slang
@@ -0,0 +1,15 @@
+// generic-arg.slang
+
+//DIAGNOSTIC_TEST:SIMPLE:
+
+// Test disambiguation of expression and generic app.
+
+namespace NS
+{
+ struct MyType<let u : int, let v : int>
+ {
+ int arr[u /(v+1-1)];
+ }
+}
+
+StructuredBuffer<NS.MyType<1, 3>> buffer;
diff --git a/tests/parser/generic-arg.slang.expected b/tests/parser/generic-arg.slang.expected
new file mode 100644
index 000000000..4c32e2510
--- /dev/null
+++ b/tests/parser/generic-arg.slang.expected
@@ -0,0 +1,5 @@
+result code = 0
+standard error = {
+}
+standard output = {
+}