2023-01-09 09:20:18 -03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								# https://github.com/godotengine/godot/issues/70964
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func test():
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									test_construct(0, false)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									test_utility(0, false)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									test_builtin_call(Vector2.UP, false)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									test_builtin_call_validated(Vector2.UP, false)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									test_object_call(RefCounted.new(), false)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									test_object_call_method_bind(Resource.new(), false)
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-25 12:42:07 -03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									test_object_call_method_bind_validated(RefCounted.new(), false)
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-09 09:20:18 -03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									print("end")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func test_construct(v, f):
							 | 
						
					
						
							
								
									
										
										
										
											2023-09-21 12:42:55 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@warning_ignore("unsafe_call_argument")
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-09 09:20:18 -03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									Vector2(v, v) # Built-in type construct.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assert(not f) # Test unary operator reading from `nil`.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func test_utility(v, f):
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									abs(v) # Utility function.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assert(not f) # Test unary operator reading from `nil`.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func test_builtin_call(v, f):
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-18 20:12:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@warning_ignore("unsafe_method_access")
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-09 09:20:18 -03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									v.angle() # Built-in method call.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assert(not f) # Test unary operator reading from `nil`.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func test_builtin_call_validated(v: Vector2, f):
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-18 20:12:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@warning_ignore("return_value_discarded")
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-09 09:20:18 -03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									v.abs() # Built-in method call validated.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assert(not f) # Test unary operator reading from `nil`.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func test_object_call(v, f):
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-18 20:12:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@warning_ignore("unsafe_method_access")
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-09 09:20:18 -03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									v.get_reference_count() # Native type method call.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assert(not f) # Test unary operator reading from `nil`.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								func test_object_call_method_bind(v: Resource, f):
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-18 20:12:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@warning_ignore("return_value_discarded")
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-09 09:20:18 -03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									v.duplicate() # Native type method call with MethodBind.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assert(not f) # Test unary operator reading from `nil`.
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-25 12:42:07 -03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								func test_object_call_method_bind_validated(v: RefCounted, f):
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-18 20:12:33 +03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									@warning_ignore("return_value_discarded")
							 | 
						
					
						
							
								
									
										
										
										
											2023-07-25 12:42:07 -03:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
									v.get_reference_count() # Native type method call with validated MethodBind.
							 | 
						
					
						
							
								
									
										
										
										
											2023-01-09 09:20:18 -03:00
										 
									 
								 
							 | 
							
								
							 | 
							
								
							 | 
							
							
									assert(not f) # Test unary operator reading from `nil`.
							 |