9350925efe
R=brianwilkerson@google.com, paulberry@google.com Bug: Change-Id: I39d26ea0b333ddfa69f281eeba78b04212e95a96 Reviewed-on: https://dart-review.googlesource.com/17960 Commit-Queue: Konstantin Shcheglov <scheglov@google.com> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Paul Berry <paulberry@google.com>
35 lines
1.1 KiB
Dart
35 lines
1.1 KiB
Dart
// Copyright (c) 2017, 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:test_reflective_loader/test_reflective_loader.dart';
|
|
|
|
import 'invalid_code_test.dart';
|
|
|
|
main() {
|
|
defineReflectiveSuite(() {
|
|
defineReflectiveTests(InvalidCodeTest_Driver);
|
|
});
|
|
}
|
|
|
|
@reflectiveTest
|
|
class InvalidCodeTest_Driver extends InvalidCodeTest {
|
|
@override
|
|
bool get enableNewAnalysisDriver => true;
|
|
|
|
/**
|
|
* This fails because we have a method with the empty name, and the default
|
|
* constructor, which also has the empty name. Then, when we link, we get
|
|
* a reference to this empty-named method, so we resynthesize a
|
|
* `MethodHandle` with the corresponding `ElementLocation`. But at the level
|
|
* of `ElementLocation` we cannot distinguish a reference to a method or
|
|
* a constructor. So, we return a `ConstructorElement`, and cast to
|
|
* `MethodElement` fails.
|
|
*/
|
|
@failingTest
|
|
@override
|
|
test_constructorAndMethodNameCollision() async {
|
|
return super.test_constructorAndMethodNameCollision();
|
|
}
|
|
}
|