diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-13 11:43:10 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2025-05-13 11:43:10 -0300 |
| commit | 3b9dd52be02fd43c598f4adb6fa7844e6a573923 (patch) | |
| tree | 8f858942f5db0e3d9d7cad503b59ee1541a60aa6 /testes/pm.lua | |
| parent | 7dc6aae29057c9dc4588f780c7abd72a62ff4c8e (diff) | |
| download | lua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.tar.gz lua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.tar.bz2 lua-3b9dd52be02fd43c598f4adb6fa7844e6a573923.zip | |
Collective declaration for globals ('global *')
Diffstat (limited to 'testes/pm.lua')
| -rw-r--r-- | testes/pm.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/testes/pm.lua b/testes/pm.lua index ab19eb5d..1700ca2c 100644 --- a/testes/pm.lua +++ b/testes/pm.lua | |||
| @@ -6,6 +6,8 @@ | |||
| 6 | 6 | ||
| 7 | print('testing pattern matching') | 7 | print('testing pattern matching') |
| 8 | 8 | ||
| 9 | global * <const> | ||
| 10 | |||
| 9 | local function checkerror (msg, f, ...) | 11 | local function checkerror (msg, f, ...) |
| 10 | local s, err = pcall(f, ...) | 12 | local s, err = pcall(f, ...) |
| 11 | assert(not s and string.find(err, msg)) | 13 | assert(not s and string.find(err, msg)) |
