mirror of
https://github.com/dart-lang/sdk
synced 2024-09-16 00:39:49 +00:00
[kernel] Support external procedures without @ExternalName in treeshaker/findNativeName
Dart allows 'external' functions which are not connected to their body. Calling such functions produces runtime error, but they should be accepted at compile time. Test language_2/external_test verifies this behavior. This CL fixes treeshaker/findNativeName to return 'null' instead of throwing an error for 'external' functions without @ExternalName annotation (which is used to specify native name). Change-Id: I04ec892af29ffe064ece8fddd6f67c7acdca1139 Reviewed-on: https://dart-review.googlesource.com/37122 Reviewed-by: Vyacheslav Egorov <vegorov@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
4cad8c202d
commit
450765c64e
|
@ -1251,7 +1251,6 @@ String findNativeName(Member procedure) {
|
|||
}
|
||||
}
|
||||
}
|
||||
throw 'External procedure has no @ExternalName("...") annotation!';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue