Skip to content

Commit

Permalink
[Nullable] WIP: Nullable test cases.
Browse files Browse the repository at this point in the history
  • Loading branch information
Macksaur committed Jun 21, 2024
1 parent a7ed13d commit e28295e
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Potentially unsafe for nullable "foo.c?[0]" to call "begins_with()".
Potentially unsafe for nullable "<not implemented>" to call "begins_with()".
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Potentially unsafe for nullable "foo?.b" to call "banana()".
Potentially unsafe for nullable "b" to call "banana()".
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Potentially unsafe to access nullable cast expression "nullable_instance as A?" with attribute "foo".
Potentially unsafe to access nullable cast expression "<not implemented>" with attribute "foo".
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Potentially unsafe for the nullable cast expression "nullable_string as String?" to call "begins_with()".
Potentially unsafe for the nullable cast expression "<not implemented>" to call "begins_with()".
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Potentially unsafe for the nullable expression "instance.arr" to be used in a for-loop.
Potentially unsafe for the nullable expression "arr" to be used in a for-loop.
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ class A:
var b: String
func test():
var a: A? = A.new()
a?.b = "123"
a?.b = "123"
print(a?.b)
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
The left-hand side of an assignment expression may not contain a nullable access operator ("?.").
GDTEST_OK
123
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Potentially unsafe to access nullable "foobar[0]" with attribute "bar".
Potentially unsafe to access nullable "<not implemented>" with attribute "bar".
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Potentially unsafe for nullable "foo[0]" to call "hey()".
Potentially unsafe for nullable "<not implemented>" to call "hey()".
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
GDTEST_ANALYZER_ERROR
Potentially unsafe for the nullable expression "a_instance.get_nullable_instance()?.index" to be used as an index.
Potentially unsafe for the nullable expression "index" to be used as an index.

0 comments on commit e28295e

Please sign in to comment.