-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More test samples of quirky UnrealScript.
- Loading branch information
Showing
2 changed files
with
35 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
class AmbiguousAccessTest extends Object; | ||
|
||
struct TestStruct { | ||
var Vector default; | ||
}; | ||
|
||
/** The 'default' specifier is ambiguous when used on a struct. */ | ||
function AmbiguousAccessTest() { | ||
local TestStruct test; | ||
local Vector V; | ||
|
||
// Working as expected | ||
v = test.default; | ||
|
||
// Missing support. | ||
test.default.X; | ||
|
||
// false positive, the linter should output an error. | ||
v = test.default.default; | ||
|
||
v = TestStruct().default; | ||
TestStruct().default.X; | ||
TestStruct().default.default; | ||
} | ||
|
||
function TestStruct TestStruct(); |
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 |
---|---|---|
@@ -1,6 +1,13 @@ | ||
class AmbiguousCastTest extends Object; | ||
|
||
struct AmbiguousStruct { | ||
|
||
}; | ||
|
||
// Working as intended: Expected behavior: cast to self (error) | ||
function AmbiguousCastTest(object obj) { | ||
function AmbiguousCastTest(Object obj) { | ||
AmbiguousCastTest(self); | ||
} | ||
AmbiguousStruct(self); | ||
} | ||
|
||
function AmbiguousStruct(Object obj); |