summaryrefslogtreecommitdiffstats
path: root/tests/diagnostics/mismatching-types.slang.expected
diff options
context:
space:
mode:
authorAlexey Panteleev <alpanteleev@nvidia.com>2022-04-01 10:56:02 -0700
committerGitHub <noreply@github.com>2022-04-01 10:56:02 -0700
commit2ddd252db192ab4376994d34cb9be862f97b5449 (patch)
treeca828032001de1b465e84a6c76b80177a4036649 /tests/diagnostics/mismatching-types.slang.expected
parent255fd5873f65a6b01d5385c277d55612dc3cc587 (diff)
Improved type printing (#2172)
Improved the type printing function to include the generic substitutions and parent types. Added a test for it, mismatching-types.slang
Diffstat (limited to 'tests/diagnostics/mismatching-types.slang.expected')
-rw-r--r--tests/diagnostics/mismatching-types.slang.expected35
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/diagnostics/mismatching-types.slang.expected b/tests/diagnostics/mismatching-types.slang.expected
new file mode 100644
index 000000000..2186a8d10
--- /dev/null
+++ b/tests/diagnostics/mismatching-types.slang.expected
@@ -0,0 +1,35 @@
+result code = -1
+standard error = {
+tests/diagnostics/mismatching-types.slang(51): error 30019: expected an expression of type 'GenericOuter<int>', got 'int'
+ a = 0;
+ ^
+tests/diagnostics/mismatching-types.slang(53): error 30019: expected an expression of type 'GenericOuter<int>.GenericInner<int>', got 'int'
+ a.g = 0;
+ ^
+tests/diagnostics/mismatching-types.slang(55): error 30019: expected an expression of type 'GenericOuter<int>.NonGenericInner', got 'int'
+ a.ng = 0;
+ ^
+tests/diagnostics/mismatching-types.slang(57): error 30019: expected an expression of type 'GenericOuter<int>.GenericInner<int>', got 'GenericOuter<float>.GenericInner<float>'
+ a.g = b.g;
+ ^
+tests/diagnostics/mismatching-types.slang(59): error 30019: expected an expression of type 'GenericOuter<int>.NonGenericInner', got 'GenericOuter<float>.NonGenericInner'
+ a.ng = b.ng;
+ ^
+tests/diagnostics/mismatching-types.slang(61): error 30019: expected an expression of type 'NonGenericOuter.GenericInner<int>', got 'int'
+ c.i = 0;
+ ^
+tests/diagnostics/mismatching-types.slang(63): error 30019: expected an expression of type 'NonGenericOuter.GenericInner<int>', got 'NonGenericOuter.GenericInner<float>'
+ c.i = c.f;
+ ^
+tests/diagnostics/mismatching-types.slang(65): error 30019: expected an expression of type 'NonGenericOuter.GenericInner<int>.ReallyNested', got 'int'
+ c.i.n = 0;
+ ^
+tests/diagnostics/mismatching-types.slang(74): error 30019: expected an expression of type 'Texture1D<int>', got 'Texture1D<float>'
+ Texture1D<int> t1 = tex;
+ ^~~
+tests/diagnostics/mismatching-types.slang(76): error 30019: expected an expression of type 'Texture2D<float>', got 'Texture1D<float>'
+ Texture2D<float> t2 = tex;
+ ^~~
+}
+standard output = {
+}