Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart

Issue 2916863003: Implement library access restrictions and privacy. (Closed)
Patch Set: Update status file. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
diff --git a/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart b/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
index 881b5b33b3d32a612b29d8457a4d439bab1becab..c3b1b132741dccb5827ab28e3845ced0a8427e1a 100644
--- a/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
+++ b/pkg/front_end/lib/src/fasta/builder/constructor_reference_builder.dart
@@ -5,7 +5,13 @@
library fasta.constructor_reference_builder;
import 'builder.dart'
- show Builder, ClassBuilder, PrefixBuilder, Scope, TypeBuilder;
+ show
+ Builder,
+ ClassBuilder,
+ LibraryBuilder,
+ PrefixBuilder,
+ Scope,
+ TypeBuilder;
import '../messages.dart' show warning;
@@ -25,7 +31,7 @@ class ConstructorReferenceBuilder extends Builder {
String get fullNameForErrors => "$name${suffix == null ? '' : '.$suffix'}";
- void resolveIn(Scope scope) {
+ void resolveIn(Scope scope, LibraryBuilder accessingLibrary) {
int index = name.indexOf(".");
Builder builder;
if (index == -1) {
@@ -39,7 +45,8 @@ class ConstructorReferenceBuilder extends Builder {
builder = prefix.lookup(middle, charOffset, fileUri);
} else if (builder is ClassBuilder) {
ClassBuilder cls = builder;
- builder = cls.findConstructorOrFactory(middle, charOffset, fileUri);
+ builder = cls.findConstructorOrFactory(
+ middle, charOffset, fileUri, accessingLibrary);
if (suffix == null) {
target = builder;
return;
@@ -47,8 +54,8 @@ class ConstructorReferenceBuilder extends Builder {
}
}
if (builder is ClassBuilder) {
- target =
- builder.findConstructorOrFactory(suffix ?? "", charOffset, fileUri);
+ target = builder.findConstructorOrFactory(
+ suffix ?? "", charOffset, fileUri, accessingLibrary);
}
if (target == null) {
warning(fileUri, charOffset,
« no previous file with comments | « pkg/front_end/lib/src/fasta/builder/class_builder.dart ('k') | pkg/front_end/lib/src/fasta/builder/library_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698