Swift: Update ObjectLiteralExpr test

The entities now have proper error types instead of missing types.
This commit is contained in:
Jeroen Ketema
2025-04-22 17:39:09 +02:00
committed by Paolo Tranquilli
parent b6076c0481
commit e135f5ddf6
3 changed files with 7 additions and 4 deletions

View File

@@ -1,3 +1,3 @@
| object_literals.swift:5:5:5:42 | #fileLiteral(...) | hasType: | no | getKind: | 0 | getNumberOfArguments: | 1 |
| object_literals.swift:6:5:6:61 | #colorLiteral(...) | hasType: | no | getKind: | 2 | getNumberOfArguments: | 4 |
| object_literals.swift:7:5:7:44 | #imageLiteral(...) | hasType: | no | getKind: | 1 | getNumberOfArguments: | 1 |
| object_literals.swift:5:5:5:42 | #fileLiteral(...) | hasType: | yes | getKind: | 0 | getNumberOfArguments: | 1 |
| object_literals.swift:6:5:6:61 | #colorLiteral(...) | hasType: | yes | getKind: | 2 | getNumberOfArguments: | 4 |
| object_literals.swift:7:5:7:44 | #imageLiteral(...) | hasType: | yes | getKind: | 1 | getNumberOfArguments: | 1 |

View File

@@ -0,0 +1,3 @@
| object_literals.swift:5:5:5:42 | #fileLiteral(...) | <<error type>> |
| object_literals.swift:6:5:6:61 | #colorLiteral(...) | <<error type>> |
| object_literals.swift:7:5:7:44 | #imageLiteral(...) | <<error type>> |

View File

@@ -1,7 +1,7 @@
//codeql-extractor-expected-status: 1
// These require Foundation and UIKit/AppKit to really work
// That is why compilation will fail and the entities will not have a type
// That is why compilation will fail and the entities will have error types
_ = #fileLiteral(resourceName: "file.txt")
_ = #colorLiteral(red: 255, green: 255, blue: 255, alpha: 50)
_ = #imageLiteral(resourceName: "image.gif")