blob: b7b7ff669761ae9f519d56c1e458c0924e10d4a4 [file] [log] [blame]
// Copyright (c) 2020, 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:analyzer/src/error/codes.dart';
import 'package:test_reflective_loader/test_reflective_loader.dart';
import '../dart/resolution/context_collection_resolution.dart';
main() {
defineReflectiveSuite(() {
defineReflectiveTests(MixinsSuperClassTest);
});
}
@reflectiveTest
class MixinsSuperClassTest extends PubPackageResolutionTest {
test_class() async {
await assertErrorsInCode(r'''
class A {}
class B extends A with A {}
''', [
error(CompileTimeErrorCode.MIXINS_SUPER_CLASS, 34, 1),
]);
}
test_classAlias() async {
await assertErrorsInCode(r'''
class A {}
class B = A with A;
''', [
error(CompileTimeErrorCode.MIXINS_SUPER_CLASS, 28, 1),
]);
}
}