-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
sgrekhov
committed
Jul 13, 2021
1 parent
0e8a186
commit 837e221
Showing
1 changed file
with
37 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
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; | ||
} |