Commit a8873dd
authored
Propose rules about
Cf. #1120, the rules about `main` impose very few requirements on the signature and the behavior, and the ones that are specified are actually more strict than the implementations.
This PR changes the rules such that obviously type-incorrect declarations of `main` are a compile-time error, and additional signatures (with optional arguments) allowed by the tools are now also allowed according to the specification. It is still a requirement that `main` is a method, and no library can declare a `main` which cannot be the initial function. Also, invocations of `main` are now explicitly required to be type safe (which seems to be implemented already).
Finally, it allows each tool to reject any `main` declaration according to additional implementation specific constraints, which means that no work is required in any tool in order to support this spec change.main for null-safety (#1146)1 parent 2a3c615 commit a8873dd
1 file changed
+53
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
9 | 12 | | |
10 | 13 | | |
11 | 14 | | |
| |||
998 | 1001 | | |
999 | 1002 | | |
1000 | 1003 | | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
| 1018 | + | |
| 1019 | + | |
| 1020 | + | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
1001 | 1054 | | |
1002 | 1055 | | |
1003 | 1056 | | |
| |||
0 commit comments