[dart2wasm] Remove assertion that named param Symbol cannot be private.
Though named parameters cannot be private (this is checked by the CFE/analyzer) it is not a static error to specify a named argument beginning with "_". Instead this should be a runtime error (resulting in an NSM since the caller signature won't match the target callee's). We could move this assert to the call sites but there are several that would need to have this check. And the CFE should be validating this anyway so it should be safe/simplest to just remove this assert. Fixes: https://github.com/dart-lang/sdk/issues/63201 Change-Id: I511b56c7a3b0964ef3db744a75b574dd9551e6ab Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/498340 Reviewed-by: Martin Kustermann <kustermann@google.com> Commit-Queue: Nate Biggs <natebiggs@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
13909c16eb
commit
761ece74b6
@@ -23,8 +23,6 @@ class Symbols {
|
||||
}
|
||||
|
||||
SymbolConstant symbolForNamedParameter(String name) {
|
||||
// Named parameters cannot be private.
|
||||
assert(!name.startsWith('_'));
|
||||
return SymbolConstant(name, null);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user