blob: 9eab2dea5ddbb0b66b19105d34db12c6ec6965d0 [file] [log] [blame]
// Copyright (c) 2021, 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.
/// @assertion External fields also cannot be initialized by constructors since
/// no Dart object is being created.
/// @description Checks that Union subclass fields cannot be initialized by the
/// constructors
/// @author
import "dart:ffi";
class U1 extends Union {
external int i;
// ^
// [analyzer] unspecified
// [cfe] unspecified
void main() {
new U1(42);