From 5f0b8dd716588ae2045a8b41dae0ee6a515d3f9f Mon Sep 17 00:00:00 2001 From: Djordje Mijovic Date: Wed, 14 Oct 2020 13:47:00 +0200 Subject: [PATCH] [Sol->Yul] Changing yul unimplemented test as delete bytes is implemented now. --- libsolidity/codegen/YulUtilFunctions.cpp | 5 ++++- test/cmdlineTests/yul_unimplemented/err | 8 ++++---- test/cmdlineTests/yul_unimplemented/input.sol | 3 ++- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/libsolidity/codegen/YulUtilFunctions.cpp b/libsolidity/codegen/YulUtilFunctions.cpp index 206133598..7884fcfa4 100644 --- a/libsolidity/codegen/YulUtilFunctions.cpp +++ b/libsolidity/codegen/YulUtilFunctions.cpp @@ -2123,7 +2123,10 @@ string YulUtilFunctions::updateStorageValueFunction( fromReferenceType->location(), fromReferenceType->isPointer() ).get() == *fromReferenceType, ""); - solUnimplementedAssert(fromReferenceType->location() != DataLocation::Storage, ""); + solUnimplementedAssert( + fromReferenceType->location() != DataLocation::Storage, + "Copying from storage to storage is not yet implemented." + ); solAssert(toReferenceType->category() == fromReferenceType->category(), ""); if (_toType.category() == Type::Category::Array) diff --git a/test/cmdlineTests/yul_unimplemented/err b/test/cmdlineTests/yul_unimplemented/err index 369fb41d8..d4b9fe68d 100644 --- a/test/cmdlineTests/yul_unimplemented/err +++ b/test/cmdlineTests/yul_unimplemented/err @@ -1,5 +1,5 @@ -Error (1834): Unimplemented feature error: Byte Arrays not yet implemented! in FILENAME REMOVED - --> yul_unimplemented/input.sol:6:9: +Error (1834): Unimplemented feature error: Copying from storage to storage is not yet implemented. in FILENAME REMOVED + --> yul_unimplemented/input.sol:7:9: | -6 | delete a; - | ^^^^^^^^ +7 | a = b; + | ^^^^^ diff --git a/test/cmdlineTests/yul_unimplemented/input.sol b/test/cmdlineTests/yul_unimplemented/input.sol index 6fcccaa9b..1ed933ade 100644 --- a/test/cmdlineTests/yul_unimplemented/input.sol +++ b/test/cmdlineTests/yul_unimplemented/input.sol @@ -2,7 +2,8 @@ pragma solidity >=0.0; contract test { bytes a; + bytes b; function f() public { - delete a; + a = b; } } \ No newline at end of file