mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:41:41 +00:00
Add missing return in loadLibrary tearoff
The code to represent a tearoff of loadLibrary looked like this: Future __loadLibrary__lib1 () { lib1.loadLibrary(); } but should have been like: Future __loadLibrary__lib1 () { return lib1.loadLibrary(); } Change-Id: I31efb5bee9f7e376660602c1b842a90a0a2659a4 Reviewed-on: https://dart-review.googlesource.com/34510 Commit-Queue: Sigmund Cherem <sigmund@google.com> Reviewed-by: Emily Fortuna <efortuna@google.com> Reviewed-by: Peter von der Ahé <ahe@google.com>
This commit is contained in:
parent
93d8c9fe2a
commit
f1390f7660
|
@ -10,7 +10,7 @@ import 'package:kernel/ast.dart'
|
||||||
ProcedureKind,
|
ProcedureKind,
|
||||||
Name,
|
Name,
|
||||||
FunctionNode,
|
FunctionNode,
|
||||||
ExpressionStatement,
|
ReturnStatement,
|
||||||
LibraryDependency;
|
LibraryDependency;
|
||||||
|
|
||||||
import 'builder.dart' show Builder, LibraryBuilder;
|
import 'builder.dart' show Builder, LibraryBuilder;
|
||||||
|
@ -39,10 +39,8 @@ class LoadLibraryBuilder extends Builder {
|
||||||
if (tearoff != null) return tearoff;
|
if (tearoff != null) return tearoff;
|
||||||
LoadLibrary expression = createLoadLibrary(charOffset);
|
LoadLibrary expression = createLoadLibrary(charOffset);
|
||||||
String prefix = expression.import.name;
|
String prefix = expression.import.name;
|
||||||
tearoff = new Procedure(
|
tearoff = new Procedure(new Name('__loadLibrary_$prefix', parent.target),
|
||||||
new Name('__loadLibrary_$prefix', parent.target),
|
ProcedureKind.Method, new FunctionNode(new ReturnStatement(expression)),
|
||||||
ProcedureKind.Method,
|
|
||||||
new FunctionNode(new ExpressionStatement(expression)),
|
|
||||||
fileUri: parent.target.fileUri)
|
fileUri: parent.target.fileUri)
|
||||||
..fileOffset = charOffset;
|
..fileOffset = charOffset;
|
||||||
return tearoff;
|
return tearoff;
|
||||||
|
|
|
@ -160,7 +160,6 @@ constructor_redirect2_test/01: MissingCompileTimeError
|
||||||
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
|
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
|
||||||
cyclic_constructor_test/01: Crash # Issue 30856
|
cyclic_constructor_test/01: Crash # Issue 30856
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
deferred_call_empty_before_load_test: RuntimeError
|
||||||
deferred_closurize_load_library_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
|
@ -557,7 +556,6 @@ constructor_redirect2_negative_test: Crash # Stack Overflow
|
||||||
constructor_redirect2_test/01: MissingCompileTimeError
|
constructor_redirect2_test/01: MissingCompileTimeError
|
||||||
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
|
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
|
||||||
cyclic_constructor_test/01: Crash # Stack Overflow
|
cyclic_constructor_test/01: Crash # Stack Overflow
|
||||||
deferred_closurize_load_library_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
|
@ -875,7 +873,6 @@ constructor_redirect2_test/01: MissingCompileTimeError
|
||||||
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
|
constructor_redirect_test/01: Crash # Assertion failure: Cannot find value Instance of 'ThisLocal' in (local(A.named2#x), local(A.named2#y), local(A.named2#z)) for j:constructor(A.named2).
|
||||||
cyclic_constructor_test/01: Crash # Issue 30856
|
cyclic_constructor_test/01: Crash # Issue 30856
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
deferred_call_empty_before_load_test: RuntimeError
|
||||||
deferred_closurize_load_library_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/default_argument2: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
deferred_constraints_constants_test/default_argument2: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
||||||
deferred_constraints_constants_test/none: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
deferred_constraints_constants_test/none: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
||||||
deferred_constraints_constants_test/reference_after_load: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
deferred_constraints_constants_test/reference_after_load: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
||||||
|
@ -1201,8 +1198,6 @@ cyclic_type_test/02: RuntimeError
|
||||||
cyclic_type_test/03: RuntimeError
|
cyclic_type_test/03: RuntimeError
|
||||||
cyclic_type_test/04: RuntimeError
|
cyclic_type_test/04: RuntimeError
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
deferred_call_empty_before_load_test: RuntimeError
|
||||||
deferred_closurize_load_library_test: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
|
||||||
deferred_closurize_load_library_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/default_argument2: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
deferred_constraints_constants_test/default_argument2: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
||||||
deferred_constraints_constants_test/none: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
deferred_constraints_constants_test/none: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
||||||
deferred_constraints_constants_test/reference_after_load: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
deferred_constraints_constants_test/reference_after_load: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
||||||
|
|
|
@ -1208,7 +1208,6 @@ covariant_override/runtime_check_test: RuntimeError
|
||||||
covariant_subtyping_test: CompileTimeError
|
covariant_subtyping_test: CompileTimeError
|
||||||
cyclic_constructor_test/01: Crash # Stack Overflow
|
cyclic_constructor_test/01: Crash # Stack Overflow
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
deferred_call_empty_before_load_test: RuntimeError
|
||||||
deferred_closurize_load_library_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
|
@ -1767,7 +1766,6 @@ covariant_subtyping_unsafe_call2_test: RuntimeError
|
||||||
covariant_subtyping_unsafe_call3_test: RuntimeError
|
covariant_subtyping_unsafe_call3_test: RuntimeError
|
||||||
cyclic_constructor_test/01: Crash # Stack Overflow
|
cyclic_constructor_test/01: Crash # Stack Overflow
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
deferred_call_empty_before_load_test: RuntimeError
|
||||||
deferred_closurize_load_library_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/default_argument2: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/none: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
deferred_constraints_constants_test/reference_after_load: Crash # Unsupported operation: KernelDeferredLoadTask.addMirrorElementsForLibrary
|
||||||
|
@ -2264,7 +2262,6 @@ covariant_subtyping_unsafe_call3_test: RuntimeError
|
||||||
crash_6725_test/01: MissingCompileTimeError
|
crash_6725_test/01: MissingCompileTimeError
|
||||||
cyclic_constructor_test/01: Crash # Issue 30856
|
cyclic_constructor_test/01: Crash # Issue 30856
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
deferred_call_empty_before_load_test: RuntimeError
|
||||||
deferred_closurize_load_library_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/default_argument2: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
deferred_constraints_constants_test/default_argument2: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
||||||
deferred_constraints_constants_test/none: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
deferred_constraints_constants_test/none: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
||||||
deferred_constraints_constants_test/reference_after_load: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
deferred_constraints_constants_test/reference_after_load: Crash # Assertion failure: Missing scope info for j:method(_loadLibraryWrapper).
|
||||||
|
@ -3022,7 +3019,6 @@ covariant_subtyping_unsafe_call3_test: RuntimeError
|
||||||
crash_6725_test/01: MissingCompileTimeError
|
crash_6725_test/01: MissingCompileTimeError
|
||||||
cyclic_constructor_test/01: Crash # Issue 30856
|
cyclic_constructor_test/01: Crash # Issue 30856
|
||||||
deferred_call_empty_before_load_test: RuntimeError
|
deferred_call_empty_before_load_test: RuntimeError
|
||||||
deferred_closurize_load_library_test: RuntimeError
|
|
||||||
deferred_constraints_constants_test/default_argument2: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
deferred_constraints_constants_test/default_argument2: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
||||||
deferred_constraints_constants_test/none: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
deferred_constraints_constants_test/none: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
||||||
deferred_constraints_constants_test/reference_after_load: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
deferred_constraints_constants_test/reference_after_load: Crash # NoSuchMethodError: The getter 'closureClassEntity' was called on null.
|
||||||
|
|
|
@ -720,7 +720,6 @@ conditional_import_string_test: RuntimeError # Unsupported operation: String.fro
|
||||||
conditional_import_test: RuntimeError # Unsupported operation: bool.fromEnvironment can only be used as a const constructor
|
conditional_import_test: RuntimeError # Unsupported operation: bool.fromEnvironment can only be used as a const constructor
|
||||||
cyclic_type_test/00: RuntimeError # Expect.equals(expected: <Derived>, actual: <dynamic>) fails.
|
cyclic_type_test/00: RuntimeError # Expect.equals(expected: <Derived>, actual: <dynamic>) fails.
|
||||||
cyclic_type_test/01: RuntimeError # Expect.equals(at index 0: Expected <Derived<Derived<int>>...>, Found: <dynamic>) fails.
|
cyclic_type_test/01: RuntimeError # Expect.equals(at index 0: Expected <Derived<Derived<int>>...>, Found: <dynamic>) fails.
|
||||||
deferred_closurize_load_library_test: RuntimeError # NoSuchMethodError: method not found: 'then'
|
|
||||||
enum_duplicate_test/01: RuntimeError # NoSuchMethodError: method not found: '<Unexpected Null Value>'
|
enum_duplicate_test/01: RuntimeError # NoSuchMethodError: method not found: '<Unexpected Null Value>'
|
||||||
enum_duplicate_test/02: RuntimeError # NoSuchMethodError: method not found: '<Unexpected Null Value>'
|
enum_duplicate_test/02: RuntimeError # NoSuchMethodError: method not found: '<Unexpected Null Value>'
|
||||||
enum_duplicate_test/none: RuntimeError # NoSuchMethodError: method not found: '<Unexpected Null Value>'
|
enum_duplicate_test/none: RuntimeError # NoSuchMethodError: method not found: '<Unexpected Null Value>'
|
||||||
|
|
Loading…
Reference in a new issue