Skip to content

Looping string concatenation #442

@mbenke

Description

@mbenke

With #391, this seems to loop:

import std.{*};
contract Cat {
   function main() -> word {
     let e : empty = empty(1);
     
     let b : memory(bytes) = concat(e,concat(e,to_bytes(e)));
     return 42;
     //return uint256(MemoryAttributes.len(e));
   }
}
$ ./runsol.sh tmp/cat2.solc
Processing: tmp/cat2.solc
Compiling to hull...
Emitting hull for contract Cat
Writing to output1.hull
Generating Yul...
writing output to /home/ben/work/review/build/cat2.yul
Compiling to bytecode...
Hex output: /home/ben/work/review/build/cat2.hex
Executing...
Creation successful
returndata: 0x6022601e...5b604c56
Executing...
Execution failed: gas uint64 overflow
returndata: 0x

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions