diff --git a/static_core/plugins/ets/GenerateStdLib.cmake b/static_core/plugins/ets/GenerateStdLib.cmake index 3bfde506ac3e8dca664748fdcfadec00748bc417..c1720583d093f156f833e8079743502fa773c168 100644 --- a/static_core/plugins/ets/GenerateStdLib.cmake +++ b/static_core/plugins/ets/GenerateStdLib.cmake @@ -15,9 +15,9 @@ function(regenerate_and_check_stdlib) # NOTE(ivan-tyulyandin): add array.sh and related generated files # Preparations to check generated against used code equality set(ESCOMPAT "stdlib/escompat") - set(ESCOMPAT_GEN_FILES "DataView.ets" "TypedUArrays.ets" "TypedArrays.ets" "Array.ets") + set(ESCOMPAT_GEN_FILES "TypedUArrays.ets" "TypedArrays.ets" "Array.ets") set(STD_CORE "stdlib/std/core") - set(STD_CORE_GEN_FILES "Function.ets" "Tuple.ets" "BuiltinArray.ets" "BuiltinArraySort.ets" "BuiltinArrayAlgorithms.ets") + set(STD_CORE_GEN_FILES "DataView.ets" "Function.ets" "Tuple.ets" "BuiltinArray.ets" "BuiltinArraySort.ets" "BuiltinArrayAlgorithms.ets") set(STD_INTEROP "stdlib/std/interop/js") set(STD_INTEROP_GEN_FILES "InteropTransferHelper.ets") set(GEN_FILES ) diff --git a/static_core/plugins/ets/stdlib/escompat/ArrayBuffer.ets b/static_core/plugins/ets/stdlib/escompat/ArrayBuffer.ets index f4bcea23746b666d3ce2fc19db1deaeab71d0795..9595641c64475286e699016bb065b17215863c87 100644 --- a/static_core/plugins/ets/stdlib/escompat/ArrayBuffer.ets +++ b/static_core/plugins/ets/stdlib/escompat/ArrayBuffer.ets @@ -19,7 +19,7 @@ package escompat; * Either ArrayBuffer */ // NOTE (kprokopenko): make abstract after abstract overloads get to work -abstract class Buffer { +export abstract class Buffer { abstract getByteLength(): int abstract at(i: int): byte abstract set(i: int, b: byte) diff --git a/static_core/plugins/ets/stdlib/escompat/DataView.ets b/static_core/plugins/ets/stdlib/std/core/DataView.ets similarity index 99% rename from static_core/plugins/ets/stdlib/escompat/DataView.ets rename to static_core/plugins/ets/stdlib/std/core/DataView.ets index d1db0e15ac483b9dfa56c838a95d22b5725b82e9..634c9a21092d48e683170d1f1c17b58268d29d07 100644 --- a/static_core/plugins/ets/stdlib/escompat/DataView.ets +++ b/static_core/plugins/ets/stdlib/std/core/DataView.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -package escompat; +package std.core; export final class DataView implements ArrayBufferView { /** Underlying buffer */ diff --git a/static_core/plugins/ets/templates/stdlib/DataView.ets.j2 b/static_core/plugins/ets/templates/stdlib/DataView.ets.j2 index eec34ba5fb2d5dd1c4518d46bacad9af0cc97db0..83dc89838cc25fe277991624260a58d229790edf 100644 --- a/static_core/plugins/ets/templates/stdlib/DataView.ets.j2 +++ b/static_core/plugins/ets/templates/stdlib/DataView.ets.j2 @@ -13,7 +13,7 @@ * limitations under the License. */ -package escompat; +package std.core; export final class DataView implements ArrayBufferView { /** Underlying buffer */ diff --git a/static_core/plugins/ets/templates/stdlib/genlib.sh b/static_core/plugins/ets/templates/stdlib/genlib.sh index 7a91a491ca949961973137e22ff80eebe0acf4d2..3c13115af4ec5d70c44c14afdc11460c3b7726ee 100755 --- a/static_core/plugins/ets/templates/stdlib/genlib.sh +++ b/static_core/plugins/ets/templates/stdlib/genlib.sh @@ -24,7 +24,7 @@ readonly ARR="${GEN_ESCOMPAT_PATH}/Array.ets" readonly BLT_ARR="${GEN_STDCORE_PATH}/BuiltinArray.ets" readonly BLT_ARR_SORT="${GEN_STDCORE_PATH}/BuiltinArraySort.ets" readonly BLT_ARR_ARG="${GEN_STDCORE_PATH}/BuiltinArrayAlgorithms.ets" -readonly DATAVIEW="${GEN_ESCOMPAT_PATH}/DataView.ets" +readonly DATAVIEW="${GEN_STDCORE_PATH}/DataView.ets" readonly TYPED_ARR="${GEN_ESCOMPAT_PATH}/TypedArrays.ets" readonly TYPED_UARR="${GEN_ESCOMPAT_PATH}/TypedUArrays.ets" readonly FUNC="${GEN_STDCORE_PATH}/Function.ets" diff --git a/static_core/plugins/ets/tests/stdlib-templates/spec/generic/issue14700.ets b/static_core/plugins/ets/tests/stdlib-templates/spec/generic/issue14700.ets index 2946c518f0ca236fea3d58a889283392fee252e1..58cd8c4f3c9f541454a6b8e8e57117cc244efbc5 100644 --- a/static_core/plugins/ets/tests/stdlib-templates/spec/generic/issue14700.ets +++ b/static_core/plugins/ets/tests/stdlib-templates/spec/generic/issue14700.ets @@ -22,10 +22,10 @@ tags: [] ---*/ -class Buffer { +class BufferA { } -class TestArrayBuffer extends Buffer { +class TestArrayBuffer extends BufferA { constructor(size: number) { } }