mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 00:13:50 +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,
|
||||
Name,
|
||||
FunctionNode,
|
||||
ExpressionStatement,
|
||||
ReturnStatement,
|
||||
LibraryDependency;
|
||||
|
||||
import 'builder.dart' show Builder, LibraryBuilder;
|
||||
|
@ -39,10 +39,8 @@ class LoadLibraryBuilder extends Builder {
|
|||
if (tearoff != null) return tearoff;
|
||||
LoadLibrary expression = createLoadLibrary(charOffset);
|
||||
String prefix = expression.import.name;
|
||||
tearoff = new Procedure(
|
||||
new Name('__loadLibrary_$prefix', parent.target),
|
||||
ProcedureKind.Method,
|
||||
new FunctionNode(new ExpressionStatement(expression)),
|
||||
tearoff = new Procedure(new Name('__loadLibrary_$prefix', parent.target),
|
||||
ProcedureKind.Method, new FunctionNode(new ReturnStatement(expression)),
|
||||
fileUri: parent.target.fileUri)
|
||||
..fileOffset = charOffset;
|
||||
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).
|
||||
cyclic_constructor_test/01: Crash # Issue 30856
|
||||
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/none: 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_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
|
||||
deferred_closurize_load_library_test: RuntimeError
|
||||
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/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).
|
||||
cyclic_constructor_test/01: Crash # Issue 30856
|
||||
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/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).
|
||||
|
@ -1201,8 +1198,6 @@ cyclic_type_test/02: RuntimeError
|
|||
cyclic_type_test/03: RuntimeError
|
||||
cyclic_type_test/04: 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/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.
|
||||
|
|
|
@ -1208,7 +1208,6 @@ covariant_override/runtime_check_test: RuntimeError
|
|||
covariant_subtyping_test: CompileTimeError
|
||||
cyclic_constructor_test/01: Crash # Stack Overflow
|
||||
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/none: 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
|
||||
cyclic_constructor_test/01: Crash # Stack Overflow
|
||||
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/none: 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
|
||||
cyclic_constructor_test/01: Crash # Issue 30856
|
||||
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/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).
|
||||
|
@ -3022,7 +3019,6 @@ covariant_subtyping_unsafe_call3_test: RuntimeError
|
|||
crash_6725_test/01: MissingCompileTimeError
|
||||
cyclic_constructor_test/01: Crash # Issue 30856
|
||||
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/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.
|
||||
|
|
|
@ -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
|
||||
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.
|
||||
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/02: 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