@@ -195,7 +195,7 @@ The configurable URI for a `part` works just as for imports and exports, it
195
195
chooses the URI that the ` part ` directive refers to, and after that the
196
196
included file works just as any other part file.
197
197
198
- It's a ** ' ** if a Dart (parent) file with URI * P* has a ` part `
198
+ It's a ** compile-time error ** if a Dart (parent) file with URI * P* has a ` part `
199
199
directive with a URI * U* , and the source content for the URI * U* does not parse
200
200
as a ` <partDirective> ` , or if its leading ` <partHeader> ` 's ` <uri> ` string,
201
201
resolved as a URI reference against the URI * U* , does not denote the library of
@@ -229,7 +229,7 @@ defined as:
229
229
* I* is * C* .
230
230
* The import scope are computed the same way as for a pre-feature
231
231
library. The implicit import of ` dart:core ` only applies to the
232
- library file. _ As usual, it's a ' if any ` import ` ‘s
232
+ library file. _ As usual, it's a ** compile-time error ** if any ` import ` ‘s
233
233
target URI does not resolve to a valid Dart library file._
234
234
* Let's introduce * importsOf* (* S* ), where * S* is a set of ` import `
235
235
directives from a single Dart file, to refer to that computation, which
@@ -243,7 +243,7 @@ defined as:
243
243
the current file. The parent scope of * P* is * I* .
244
244
* The * P* scope contains an entry for each name where the current file
245
245
has an ` import ` directive with that name as prefix, ` as name ` . (If an
246
- import is ` deferred ` , it's a ' if more than one
246
+ import is ` deferred ` , it's a ** compile-time error ** if more than one
247
247
` import ` directive in the same file has that prefix name, as usual.
248
248
_ It's not an error if two import deferred prefixes have the same name
249
249
if they occur in different files, other file's imports are only
@@ -377,20 +377,20 @@ We say that a Dart file *includes* a part file, or that the part file
377
377
_ is included by_ a Dart file, if the Dart file has a ` part ` directive with a
378
378
URI denoting that part file.
379
379
380
- * _ It's a ' if a Dart file has two ` part ` directives with
380
+ * _ It's a ** compile-time error ** if a Dart file has two ` part ` directives with
381
381
the same URI, so each included part file is included exactly once._
382
- * _ It's a ' if a ` part ` directive denotes a file which is
382
+ * _ It's a ** compile-time error ** if a ` part ` directive denotes a file which is
383
383
not a Dart part file._
384
384
385
385
The * parent file* of a part file is the file denoted by the URI of the
386
386
` part of ` declaration of the part file. A library file has no parent file.
387
387
388
- * _ It's a ' if a part file is included by any Dart file
388
+ * _ It's a ** compile-time error ** if a part file is included by any Dart file
389
389
other than the part file's parent file._
390
390
* The * includes* and * is the parent file of* properties are equivalent for
391
391
the files of a valid Dart program. A Dart file includes a part file if,
392
392
and only if, the Dart file is the parent file of the part file, otherwise
393
- there is a ' .
393
+ there is a ** compile-time error ** .
394
394
_ (There are no restrictions on the parent file of a part file which is not
395
395
part of a library of a Dart program. Dart semantics is only assigned to
396
396
entire libraries and programs, not individual part files.)_
@@ -408,7 +408,7 @@ the Dart file, or if the file is a *sub-part* of a file included by the
408
408
* included by* relation. We'll refer to it by saying either that one Dart
409
409
file is an ancestor file of another part file, or that a part file is a
410
410
sub-part of another Dart file.
411
- * <a name =" part_cycle " ></a >_ It's a ' if a part file is
411
+ * <a name =" part_cycle " ></a >_ It's a ** compile-time error ** if a part file is
412
412
a sub-part of itself._
413
413
That is, if the * includes* relation has a cycle. _ This is not a * necessary*
414
414
error from the language's perspective, since no library can contain such a
@@ -417,7 +417,7 @@ the Dart file, or if the file is a *sub-part* of a file included by the
417
417
the including file is not the parent of that file._
418
418
_ The rule is included as a help to tools that try to analyzer Dart code
419
419
starting at individual files, they can then assume that either a part file
420
- has an ancestor which is a library file, or there is a ' .
420
+ has an ancestor which is a library file, or there is a ** compile-time error ** .
421
421
Or an infinite number of part files._
422
422
423
423
The * sub-tree* of a Dart file is the set of files containing the file itself
@@ -525,13 +525,13 @@ before, because they are considered blindingly obvious. We're making them
525
525
explicit here, and will enforce the rules strictly for post-feature code, if we
526
526
didn't already._
527
527
528
- * It's a ** ' ** if two Dart files of a library do not have the
528
+ * It's a ** compile-time error ** if two Dart files of a library do not have the
529
529
same language version._ All Dart files in a library must have the same
530
530
language version._ Can be expressed locally as:
531
- * It's a ' if the associated language version of a part
531
+ * It's a ** compile-time error ** if the associated language version of a part
532
532
file is not the same as the language version of its parent file.
533
533
534
- * It's a ** ' ** if any file of a library has a
534
+ * It's a ** compile-time error ** if any file of a library has a
535
535
language-version override marker (a line like ` // @dart=3.12 ` before any
536
536
Dart code), and any * other* file of the same library does not have a
537
537
language-version override marker. _ While it's still possible for that
@@ -547,13 +547,13 @@ didn't already._
547
547
* If a part file has no language version marker, then it's a compile-time
548
548
error if its parent file has a language version marker.
549
549
550
- * It's a ** ' ** if two Dart files of a library do not belong
550
+ * It's a ** compile-time error ** if two Dart files of a library do not belong
551
551
to the same package. _ Every file in a library must belong to the same
552
552
package to ensure that they always have the same default language version.
553
553
It's also likely to break a lot of assumptions if they don't._ Can be
554
554
expressed locally as:
555
555
556
- * It's a ' if a part file does not belong to the same
556
+ * It's a ** compile-time error ** if a part file does not belong to the same
557
557
package as its parent file.
558
558
559
559
The Dart SDK's multi-language-version support, which based on files
0 commit comments