patch 9.0.2078: several problems with type aliases

Problem:  several problems with type aliases
Solution: Check for more error conditions, add tests,
          fix issues

Check for more error conditions and add additional tests

fixes  #13434
fixes  #13437
fixes  #13438
closes #13441

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/vim9class.txt b/runtime/doc/vim9class.txt
index 53b72fc..91d9e5e 100644
--- a/runtime/doc/vim9class.txt
+++ b/runtime/doc/vim9class.txt
@@ -749,7 +749,9 @@
 	:type ListOfStrings = list<string>
 
 The type alias can be used wherever a built-in type can be used.  The type
-alias name must start with an upper case character.
+alias name must start with an upper case character.  A type alias can be
+created only at the script level and not inside a function.  A type alias can
+be exported and used across scripts.
 
 ==============================================================================