File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -77,6 +77,9 @@ return-type:
7777 ':' 'void' 
7878
7979type-declaration: 
80+  '?'? base-type-declaration 
81+ 
82+ base-type-declaration: 
8083 'array' 
8184 'callable' 
8285 'iterable' 
@@ -123,6 +126,9 @@ default-argument-specifier:
123126 : void
124127
125128<i  id =" grammar-type-declaration " >type-declaration:</i >
129+  ?<sub >opt</sub > <i ><a  href =" #grammar-base-type-declaration " >base-type-declaration</a ></i >
130+ 
131+ <i  id =" grammar-base-type-declaration " >base-type-declaration:</i >
126132 array
127133 callable
128134 iterable
@@ -218,7 +224,9 @@ Parameters typed with *scalar-type* are accepted if they pass the type check for
218224as [ described below] ( #type-check-modes ) . Once the checks have been passed, the parameter types are always of the scalar type
219225specified (or ` NULL `  if ` NULL `  is allowed).
220226
221- If a parameter has a type declaration, ` NULL `  is not accepted unless it has a default value that evaluates to ` NULL ` .
227+ If a parameter has a type declaration, ` NULL `  is not accepted unless the
228+ type is nullable. A type is nullable if it is prefixed with ` ? `  or if the
229+ parameter has a default value that evaluates to ` NULL ` .
222230
223231The default value for a typed parameter must be of the type specified, or ` NULL ` ,
224232and conversion is not be performed for defaults, regardless of the mode.
Original file line number Diff line number Diff line change @@ -929,6 +929,9 @@ The grammar notation is described in [Grammars section](09-lexical-structure.md#
929929 : void
930930
931931<i  id =" grammar-type-declaration " >type-declaration:</i >
932+  ?<sub >opt</sub > <i ><a  href =" #grammar-base-type-declaration " >base-type-declaration</a ></i >
933+ 
934+ <i  id =" grammar-base-type-declaration " >base-type-declaration:</i >
932935 array
933936 callable
934937 iterable
                         You can’t perform that action at this time. 
           
                  
0 commit comments