-
If the function A is written in a file, the IDE will hint you an error when you write another function with the same name and same param in the other file
-
I find the funciton written in a file can call anywhere directly with none prefix. It's said that this function is compiled to a static function belong to the applicaiton.
-
If you define a function one(value : Type) in class A ,and then you define a function one (value : Type) with the same fun name 、the same param count and the same param type in class B , It's no problem . The two function is not the same function,they all hava there's class name prefix:A.one(value:Type) B.one(value:Type)
网友评论