forked from pclewis/lslint
-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add error: "Lists can't contain lists".
Applies to list constants and list constructors where one of the elements is of type list. Closes #36, with the difference that it's an error instead of a warning as suggested in #69.
- Loading branch information
Showing
6 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
list g1; | ||
key a = ""; | ||
list g2 = [1, 2, 3, a]; | ||
list g3 = [1, 2, 3, | ||
g2 // $[E10038] Lists can't contain lists | ||
]; | ||
list g4 = | ||
[ // $[E10020] Global initializer must be constant | ||
// (in globals, the syntax doesn't allow [[]]) | ||
[]]; | ||
|
||
default{timer(){ | ||
g1 = [ | ||
g2 // $[E10038] | ||
, | ||
g3 // $[E10038] | ||
, | ||
llGetPrimitiveParams // $[E10038] | ||
([])]; | ||
g2 = [ | ||
[ // $[E10038] | ||
]]; | ||
|
||
g3 = [ | ||
( // $[E10038] | ||
list)0]; | ||
}} |