-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix accessing private members on extension classes.
Since the member was already a symbol, canonicalMember() was incorrectly double wrapping it. Fixes #508. [email protected] Review URL: https://codereview.chromium.org/1944293003 .
- Loading branch information
1 parent
56b9d09
commit a6d1fbf
Showing
3 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
pkg/dev_compiler/test/codegen/lib/html/private_extension_member_test.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | ||
// for details. All rights reserved. Use of this source code is governed by a | ||
// BSD-style license that can be found in the LICENSE file. | ||
|
||
import 'package:expect/expect.dart'; | ||
|
||
import 'dart:html'; | ||
|
||
main() { | ||
// Regression test for: https://github.com/dart-lang/dev_compiler/issues/508. | ||
// "dart:html" defines some private members on native DOM types and we need | ||
// to ensure those can be accessed correctly. | ||
// | ||
// The createFragment() method sets `_innerHtml` on the element, so we use it | ||
// as a test case. | ||
Expect.equals("[object DocumentFragment]", | ||
new BRElement().createFragment("Hi").toString()); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters