blob: 5706eb73d12b6776b2188fa07bbb29c84e1c0484 [file] [log] [blame]
/*
* Copyright (c) 2019, 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 The grammar of types is extended to allow any type to be suffixed
* with a ? (e.g. int?) indicating the nullable version of that type.
*
* @description Check that any type can be suffixed with a ? indicating the
* nullable version of that type. Test Never
* @author sgrekhov@unipro.ru
*/
// SharedOptions=--enable-experiment=non-nullable
Never? foo(Never? n) => n;
main() {
Never? n = null;
n = foo(n);
}