diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2024-10-30 22:58:07 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-30 22:58:07 -0700 |
| commit | 1487a1f98d8916985b243f4a0113d216c42e4ba3 (patch) | |
| tree | f19e0f9c346ed4759830d135a79247947bb0d3dd /tests/diagnostics/attribute-error.slang | |
| parent | a98fb6cbb4a846fc63266466a143690037e29c44 (diff) | |
Constant-fold for the type-casting in switch-case labels (#5436)
Diffstat (limited to 'tests/diagnostics/attribute-error.slang')
| -rw-r--r-- | tests/diagnostics/attribute-error.slang | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/diagnostics/attribute-error.slang b/tests/diagnostics/attribute-error.slang index 9cc24437a..d3f202e26 100644 --- a/tests/diagnostics/attribute-error.slang +++ b/tests/diagnostics/attribute-error.slang @@ -2,7 +2,7 @@ // Tests reflection of user defined attributes. -//DIAGNOSTIC_TEST:REFLECTION:-stage compute -entry main -target hlsl +//TEST:SIMPLE(filecheck=REFLECTION):-stage compute -entry main -target hlsl [__AttributeUsage(_AttributeTargets.Struct)] struct MyStructAttribute @@ -16,9 +16,11 @@ struct DefaultValueAttribute int iParam; }; +//REFLECTION:([[# @LINE+1]]): error 30019: expected an expression of type 'float', got 'String' [MyStruct(0, "stringVal")] // attribute arg type mismatch struct A { + //REFLECTION:([[# @LINE+1]]): error 31002: attribute 'MyStruct' is not valid here [MyStruct(0, 10.0)] // attribute does not apply to this construct float x; [DefaultValue(2.0)] // attribute arg type mismatch @@ -31,4 +33,4 @@ ParameterBlock<A> param; void main( uint3 dispatchThreadID : SV_DispatchThreadID) { -}
\ No newline at end of file +} |
