mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 16:41:07 +00:00
Add LICENSE and corresponding headers
Fix expectations where line number has changed. R=dgrove@google.com Review URL: https://chromereviews.googleplex.com/158257013
This commit is contained in:
parent
e22ce4ce4c
commit
5c1c9c2381
35
pkg/dev_compiler/LICENSE.md
Normal file
35
pkg/dev_compiler/LICENSE.md
Normal file
|
@ -0,0 +1,35 @@
|
|||
This license applies to all files contained here with the following
|
||||
exceptions:
|
||||
|
||||
- All code in test/js_test_tools is externally maintained with
|
||||
corresponding licenses in those individual files and directories.
|
||||
|
||||
---
|
||||
|
||||
Copyright 2015, the Dart project authors. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
* Redistributions in binary form must reproduce the above
|
||||
copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided
|
||||
with the distribution.
|
||||
* Neither the name of Google Inc. nor the names of its
|
||||
contributors may be used to endorse or promote products derived
|
||||
from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env dart
|
||||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Command line tool to run the checker on a Dart program.
|
||||
library ddc.bin.checker;
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env dart
|
||||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Command line tool to write checker errors as inline comments in the source
|
||||
/// code of the program. This tool requires the info.json file created by
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Configuration of DDC rule set.
|
||||
library ddc.config;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Command line tool to run the checker on a Dart program.
|
||||
library ddc.devc;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
var dart_core;
|
||||
(function (dart_core) {
|
||||
var Object = (function () {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.runtime.dart_logging_runtime;
|
||||
|
||||
import 'dart:mirrors' as mirrors;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.runtime.dart_runtime;
|
||||
|
||||
import 'dart:mirrors';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
var dart;
|
||||
(function (dart) {
|
||||
var defineProperty = Object.defineProperty;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
// Feature test for harmony support, alert if not present.
|
||||
(function () {
|
||||
try {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
var fs = require('fs');
|
||||
var vm = require('vm');
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.src.checker.checker;
|
||||
|
||||
import 'package:analyzer/analyzer.dart';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Common logic needed to provide a Dart SDK to the analyzer's resolver. This
|
||||
/// includes logic to determine where the sdk is located in the filesystem, and
|
||||
/// definitions to provide mock sdks.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Encapsulates how to invoke the analyzer resolver and overrides how it
|
||||
/// computes types on expressions to use our restricted set of types.
|
||||
library ddc.src.checker.resolver;
|
||||
|
@ -10,8 +14,7 @@ import 'package:analyzer/src/generated/error.dart';
|
|||
import 'package:analyzer/src/generated/java_io.dart' show JavaFile;
|
||||
import 'package:analyzer/src/generated/resolver.dart';
|
||||
import 'package:analyzer/src/generated/static_type_analyzer.dart';
|
||||
import 'package:analyzer/src/generated/sdk_io.dart'
|
||||
show DirectoryBasedDartSdk;
|
||||
import 'package:analyzer/src/generated/sdk_io.dart' show DirectoryBasedDartSdk;
|
||||
import 'package:analyzer/src/generated/source.dart' show DartUriResolver;
|
||||
import 'package:analyzer/src/generated/source.dart' show Source;
|
||||
import 'package:analyzer/src/generated/source_io.dart';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.src.checker.rules;
|
||||
|
||||
import 'package:analyzer/src/generated/ast.dart';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.src.codegen.ast_builder;
|
||||
|
||||
import 'package:analyzer/src/generated/ast.dart';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.src.codegen.code_generator;
|
||||
|
||||
import 'dart:io';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.src.codegen.dart_codegen;
|
||||
|
||||
import 'dart:io' show File;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.src.codegen.js_codegen;
|
||||
|
||||
import 'dart:io' show Directory;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.src.codegen.reify_coercions;
|
||||
|
||||
import 'package:analyzer/analyzer.dart' as analyzer;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Defines static information collected by the type checker and used later by
|
||||
/// emitters to generate code.
|
||||
library ddc.src.info;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Summarizes the information produced by the checker.
|
||||
library ddc.src.report;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library ddc.src.testing;
|
||||
|
||||
import 'package:analyzer/src/generated/ast.dart';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Holds a couple utility functions used at various places in the system.
|
||||
library ddc.src.utils;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Meta-test that runs all tests we have written.
|
||||
library ddc.test.all_tests;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// General type checking tests
|
||||
library ddc.test.checker_test;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Tests for type inference.
|
||||
library ddc.test.inferred_type_test;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Tests that run the checker end-to-end using the file system.
|
||||
library ddc.test.end_to_end;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
class A {
|
||||
var x;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
class A {}
|
||||
|
||||
class B {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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 'html_input_b.dart';
|
||||
import 'html_input_c.dart';
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
export 'html_input_d.dart';
|
||||
|
||||
int x = 22;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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 'html_input_e.dart';
|
||||
|
||||
int y = 3 + w;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library html_input_d;
|
||||
|
||||
int fib(int n) => _fib(n, new Map<int, int>());
|
||||
|
|
|
@ -1 +1,5 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
int w = 9;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library dom;
|
||||
|
||||
class JsType {
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// Messages from compiling cascade.dart
|
||||
warning: line 12, column 5 of test/codegen/cascade.dart: ..x() requires dynamic invoke
|
||||
warning: line 16, column 5 of test/codegen/cascade.dart: ..x() requires dynamic invoke
|
||||
..x()
|
||||
^^^^^
|
||||
warning: line 13, column 5 of test/codegen/cascade.dart: ..x() requires dynamic invoke
|
||||
warning: line 17, column 5 of test/codegen/cascade.dart: ..x() requires dynamic invoke
|
||||
..x();
|
||||
^^^^^
|
||||
warning: line 23, column 5 of test/codegen/cascade.dart: ..x() requires dynamic invoke
|
||||
warning: line 27, column 5 of test/codegen/cascade.dart: ..x() requires dynamic invoke
|
||||
..x()
|
||||
^^^^^
|
||||
warning: line 24, column 5 of test/codegen/cascade.dart: ..x() requires dynamic invoke
|
||||
warning: line 28, column 5 of test/codegen/cascade.dart: ..x() requires dynamic invoke
|
||||
..x();
|
||||
^^^^^
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
// Messages from compiling fieldtest.dart
|
||||
warning: line 19, column 9 of test/codegen/fieldtest.dart: a.x requires dynamic invoke
|
||||
warning: line 23, column 9 of test/codegen/fieldtest.dart: a.x requires dynamic invoke
|
||||
print(a.x);
|
||||
^^^
|
||||
info: line 20, column 10 of test/codegen/fieldtest.dart: a.x (dynamic) will need runtime check to cast to type int
|
||||
info: line 24, column 10 of test/codegen/fieldtest.dart: a.x (dynamic) will need runtime check to cast to type int
|
||||
return a.x;
|
||||
^^^
|
||||
warning: line 20, column 10 of test/codegen/fieldtest.dart: a.x requires dynamic invoke
|
||||
warning: line 24, column 10 of test/codegen/fieldtest.dart: a.x requires dynamic invoke
|
||||
return a.x;
|
||||
^^^
|
||||
info: line 31, column 7 of test/codegen/fieldtest.dart: value (dynamic) will need runtime check to cast to type int
|
||||
info: line 35, column 7 of test/codegen/fieldtest.dart: value (dynamic) will need runtime check to cast to type int
|
||||
y = value;
|
||||
^^^^^
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// Messages from compiling methods.dart
|
||||
info: line 10, column 21 of test/codegen/methods.dart: b (num) will need runtime check to cast to type int
|
||||
info: line 14, column 21 of test/codegen/methods.dart: b (num) will need runtime check to cast to type int
|
||||
int z([num b]) => b;
|
||||
^
|
||||
info: line 15, column 12 of test/codegen/methods.dart: a + b (num) will need runtime check to cast to type int
|
||||
info: line 19, column 12 of test/codegen/methods.dart: a + b (num) will need runtime check to cast to type int
|
||||
return a + b;
|
||||
^^^^^
|
||||
warning: line 45, column 3 of test/codegen/methods.dart: f.bar("Bar's call method!") requires dynamic invoke
|
||||
warning: line 49, column 3 of test/codegen/methods.dart: f.bar("Bar's call method!") requires dynamic invoke
|
||||
f.bar("Bar's call method!");
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library fieldtest;
|
||||
|
||||
class A {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library methods;
|
||||
|
||||
class A {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Tests code generation.
|
||||
/// Runs Dart Dev Compiler on all input in the `codegen` directory and checks
|
||||
/// that the output is what we expected.
|
||||
|
|
|
@ -6,23 +6,23 @@ import 'b.dart';
|
|||
|
||||
void bar() {
|
||||
f3(((__x0) => DDC$RT.cast(__x0, dynamic, DDC$a$.A, "CastGeneral",
|
||||
"""line 6, column 6 of test/dart_codegen/types/c.dart: """,
|
||||
"""line 10, column 6 of test/dart_codegen/types/c.dart: """,
|
||||
__x0 is DDC$a$.A, true))(f4(3)));
|
||||
f1(DDC$RT.wrap((dynamic f(dynamic __u2)) {
|
||||
dynamic c(dynamic x0) => ((__x1) => DDC$RT.cast(__x1, dynamic, DDC$a$.A,
|
||||
"CastResult",
|
||||
"""line 7, column 6 of test/dart_codegen/types/c.dart: """,
|
||||
"""line 11, column 6 of test/dart_codegen/types/c.dart: """,
|
||||
__x1 is DDC$a$.A, true))(f(x0));
|
||||
return f == null ? null : c;
|
||||
}, f4, __t5, __t3, "Wrap",
|
||||
"""line 7, column 6 of test/dart_codegen/types/c.dart: """, f4 is __t3));
|
||||
"""line 11, column 6 of test/dart_codegen/types/c.dart: """, f4 is __t3));
|
||||
f2(DDC$RT.wrap((DDC$a$.A f(DDC$a$.A __u7)) {
|
||||
DDC$a$.A c(DDC$a$.A x0) => f(DDC$RT.cast(x0, dynamic, DDC$a$.A, "CastParam",
|
||||
"""line 8, column 6 of test/dart_codegen/types/c.dart: """,
|
||||
"""line 12, column 6 of test/dart_codegen/types/c.dart: """,
|
||||
x0 is DDC$a$.A, true));
|
||||
return f == null ? null : c;
|
||||
}, f3, __t3, __t5, "Wrap",
|
||||
"""line 8, column 6 of test/dart_codegen/types/c.dart: """, f3 is __t5));
|
||||
"""line 12, column 6 of test/dart_codegen/types/c.dart: """, f3 is __t5));
|
||||
}
|
||||
typedef DDC$a$.A __t3(DDC$a$.A __u4);
|
||||
typedef dynamic __t5(dynamic __u6);
|
||||
|
|
|
@ -6,23 +6,25 @@ import 'b.dart';
|
|||
|
||||
void foo() {
|
||||
var x = f3(((__x0) => DDC$RT.cast(__x0, dynamic, DDC$a$.A, "CastGeneral",
|
||||
"""line 6, column 14 of test/dart_codegen/types/d.dart: """,
|
||||
"""line 10, column 14 of test/dart_codegen/types/d.dart: """,
|
||||
__x0 is DDC$a$.A, true))(f4("""hello""")));
|
||||
var y = f1(DDC$RT.wrap((dynamic f(dynamic __u2)) {
|
||||
dynamic c(dynamic x0) => ((__x1) => DDC$RT.cast(__x1, dynamic, DDC$a$.A,
|
||||
"CastResult",
|
||||
"""line 7, column 14 of test/dart_codegen/types/d.dart: """,
|
||||
"""line 11, column 14 of test/dart_codegen/types/d.dart: """,
|
||||
__x1 is DDC$a$.A, true))(f(x0));
|
||||
return f == null ? null : c;
|
||||
}, f4, __t5, __t3, "Wrap",
|
||||
"""line 7, column 14 of test/dart_codegen/types/d.dart: """, f4 is __t3));
|
||||
"""line 11, column 14 of test/dart_codegen/types/d.dart: """,
|
||||
f4 is __t3));
|
||||
var z = f2(DDC$RT.wrap((DDC$a$.A f(DDC$a$.A __u7)) {
|
||||
DDC$a$.A c(DDC$a$.A x0) => f(DDC$RT.cast(x0, dynamic, DDC$a$.A, "CastParam",
|
||||
"""line 8, column 14 of test/dart_codegen/types/d.dart: """,
|
||||
"""line 12, column 14 of test/dart_codegen/types/d.dart: """,
|
||||
x0 is DDC$a$.A, true));
|
||||
return f == null ? null : c;
|
||||
}, f3, __t3, __t5, "Wrap",
|
||||
"""line 8, column 14 of test/dart_codegen/types/d.dart: """, f3 is __t5));
|
||||
"""line 12, column 14 of test/dart_codegen/types/d.dart: """,
|
||||
f3 is __t5));
|
||||
}
|
||||
typedef DDC$a$.A __t3(DDC$a$.A __u4);
|
||||
typedef dynamic __t5(dynamic __u6);
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
// Messages from compiling types.dart
|
||||
info: line 6, column 6 of test/dart_codegen/types/c.dart: f4(3) (dynamic) will need runtime check to cast to type A
|
||||
info: line 10, column 6 of test/dart_codegen/types/c.dart: f4(3) (dynamic) will need runtime check to cast to type A
|
||||
f3(f4(3));
|
||||
^^^^^
|
||||
warning: line 7, column 6 of test/dart_codegen/types/c.dart: f4 ((dynamic) → dynamic) will need to be wrapped with a closure of type (A) → A
|
||||
warning: line 11, column 6 of test/dart_codegen/types/c.dart: f4 ((dynamic) → dynamic) will need to be wrapped with a closure of type (A) → A
|
||||
f1(f4);
|
||||
^^
|
||||
warning: line 8, column 6 of test/dart_codegen/types/c.dart: f3 ((A) → A) will need to be wrapped with a closure of type (dynamic) → dynamic
|
||||
warning: line 12, column 6 of test/dart_codegen/types/c.dart: f3 ((A) → A) will need to be wrapped with a closure of type (dynamic) → dynamic
|
||||
f2(f3);
|
||||
^^
|
||||
info: line 6, column 14 of test/dart_codegen/types/d.dart: f4("""hello""") (dynamic) will need runtime check to cast to type A
|
||||
info: line 10, column 14 of test/dart_codegen/types/d.dart: f4("""hello""") (dynamic) will need runtime check to cast to type A
|
||||
var x = f3(f4("""hello"""));
|
||||
^^^^^^^^^^^^^^^
|
||||
warning: line 7, column 14 of test/dart_codegen/types/d.dart: f4 ((dynamic) → dynamic) will need to be wrapped with a closure of type (A) → A
|
||||
warning: line 11, column 14 of test/dart_codegen/types/d.dart: f4 ((dynamic) → dynamic) will need to be wrapped with a closure of type (A) → A
|
||||
var y = f1(f4);
|
||||
^^
|
||||
warning: line 8, column 14 of test/dart_codegen/types/d.dart: f3 ((A) → A) will need to be wrapped with a closure of type (dynamic) → dynamic
|
||||
warning: line 12, column 14 of test/dart_codegen/types/d.dart: f3 ((A) → A) will need to be wrapped with a closure of type (dynamic) → dynamic
|
||||
var z = f2(f3);
|
||||
^^
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library types;
|
||||
|
||||
import 'types/c.dart' show foo;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library a;
|
||||
|
||||
class A {}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library b;
|
||||
|
||||
import 'a.dart';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library c;
|
||||
|
||||
import 'b.dart';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library d;
|
||||
|
||||
import 'b.dart';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Tests that run the checker end-to-end using the file system, but with a mock
|
||||
/// SDK.
|
||||
library ddc.test.end_to_end;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Tests for summary reporting.
|
||||
library ddc.test.report_test;
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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:ddc/runtime/dart_logging_runtime.dart' as ddc;
|
||||
import 'package:unittest/unittest.dart';
|
||||
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
// Test code
|
||||
import 'dart:collection';
|
||||
import 'dart:mirrors';
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library fieldtest;
|
||||
|
||||
class A {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
Function f = (int x) => x + 1;
|
||||
dynamic a = f;
|
||||
Function g = a;
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
// Some examples of how the dart type system/checked mode interacts with dart type unsoundness.
|
||||
// Suppose we were to "trust types" in the following sense: if the program passes the dart
|
||||
// type checker, assume that all checks implied by checked mode would have passed, and
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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 'imported_file.dart';
|
||||
|
||||
class B extends A {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
class A {
|
||||
int a;
|
||||
}
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
dynamic a = 42;
|
||||
|
||||
// This requires a check / unbox.
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
library runtimetypechecktest;
|
||||
|
||||
class A<T> {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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 'dart:math';
|
||||
|
||||
class A {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
// Copyright (c) 2015, 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.
|
||||
|
||||
class A {
|
||||
int x = 42;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env dart
|
||||
// Copyright (c) 2015, 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.
|
||||
|
||||
/// Command line tool to merge the SDK libraries and our patch files.
|
||||
/// This is currently designed as an offline tool, but we could automate it.
|
||||
|
|
|
@ -1,4 +1,7 @@
|
|||
#!/usr/bin/env dart
|
||||
// Copyright (c) 2015, 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.
|
||||
|
||||
// Checks that the Dart VM is at least the requested version
|
||||
import 'dart:io' show Platform, exit;
|
||||
|
|
Loading…
Reference in a new issue