Skip to content

Commit

Permalink
#993. NativeFunction test added
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrekhov committed Jul 13, 2021
1 parent 0e8a186 commit 837e221
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions LibTest/ffi/NativeFunction/NativeFunction_A01_t01.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// 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 Represents a function type in C.
///
/// NativeFunction is not constructible in the Dart code and serves purely as
/// marker in type signatures.
///
/// @description Checks that this class cannot be extended
/// @author sgrekhov@unipro.ru
import "dart:ffi";

class C1<T extends Function> extends NativeFunction<T> {
// ^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

class C2<T extends Function> implements NativeFunction<T> {
// ^^^^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

class C3 extends Object with NativeFunction {
// ^^^^^^^^^^^^^^
// [analyzer] unspecified
// [cfe] unspecified
}

void main() {
C1? c1;
C2? c2;
C3? c3;
}

0 comments on commit 837e221

Please sign in to comment.