Comments (2)
Here is generated bytecode:
entry public init() /* def_idx: 0 */ {
L0: loc0: vector<String>
L1: loc1: vector<vector<u8>>
L2: loc2: vector<u8>
L3: loc3: vector<u8>
L4: loc4: vector<String>
L5: loc5: vector<String>
L6: loc6: vector<vector<u8>>
L7: loc7: vector<u64>
L8: loc8: u64
L9: loc9: u64
L10: loc10: vector<vector<u8>>
L11: loc11: vector<vector<u8>>
B0:
0: VecPack(1, 0)
1: StLoc[0](loc0: vector<String>)
2: LdConst[0](Vector(Vector(U8)): [0])
3: StLoc[1](loc1: vector<vector<u8>>)
4: MutBorrowLoc[1](loc1: vector<vector<u8>>)
5: Call vector::reverse<vector<u8>>(&mut vector<vector<u8>>)
B1:
6: ImmBorrowLoc[1](loc1: vector<vector<u8>>)
7: Call vector::is_empty<vector<u8>>(&vector<vector<u8>>): bool
8: Not
9: BrFalse(20)
B2:
10: MutBorrowLoc[1](loc1: vector<vector<u8>>)
11: VecPopBack(2)
12: StLoc[2](loc2: vector<u8>)
13: MutBorrowLoc[0](loc0: vector<String>)
14: MoveLoc[2](loc2: vector<u8>)
15: StLoc[3](loc3: vector<u8>)
16: MoveLoc[3](loc3: vector<u8>)
17: Call string::utf8(vector<u8>): String
18: VecPushBack(1)
19: Branch(21)
B3:
20: Branch(22)
B4:
21: Branch(6)
B5:
22: MoveLoc[0](loc0: vector<String>)
23: StLoc[4](loc4: vector<String>)
24: MoveLoc[4](loc4: vector<String>)
25: StLoc[5](loc5: vector<String>)
26: VecPack(2, 0)
27: StLoc[6](loc6: vector<vector<u8>>)
28: LdConst[0](Vector(Vector(U8)): [0])
29: StLoc[7](loc7: vector<u64>)
30: MutBorrowLoc[7](loc7: vector<u64>)
31: Call vector::reverse<u64>(&mut vector<u64>)
B6:
32: ImmBorrowLoc[7](loc7: vector<u64>)
33: Call vector::is_empty<u64>(&vector<u64>): bool
34: Not
35: BrFalse(46)
B7:
36: MutBorrowLoc[7](loc7: vector<u64>)
37: VecPopBack(6)
38: StLoc[8](loc8: u64)
39: MutBorrowLoc[6](loc6: vector<vector<u8>>)
40: MoveLoc[8](loc8: u64)
41: StLoc[9](loc9: u64)
42: ImmBorrowLoc[9](loc9: u64)
43: Call bcs::to_bytes<u64>(&u64): vector<u8>
44: VecPushBack(2)
45: Branch(47)
B8:
46: Branch(48)
B9:
47: Branch(32)
B10:
48: MoveLoc[6](loc6: vector<vector<u8>>)
49: StLoc[10](loc10: vector<vector<u8>>)
50: MoveLoc[10](loc10: vector<vector<u8>>)
51: StLoc[11](loc11: vector<vector<u8>>)
52: Ret
}
}
The error happens at instr 28 and 29 where the type of vector is not correct.
from aptos-core.
The issue may be caused by two constants with different types but the same value:
const KEYS: vector<vector<u8>> = vector[];
const VALUES: vector<u64> = vector[];
from aptos-core.
Related Issues (20)
- rust 1.80.0 build issue HOT 1
- [Feature Request] Release aptos-cli to Chocolatey as part of CI HOT 2
- [compiler-v2] Generic TypeInfo verification broken
- [Bug] large package publication is not work HOT 1
- [Feature Request] Script for installing the prover on Windows
- [Bug][move-compiler-v2] Differing behavior w.r.t ability checks in the presence of unreachable code HOT 3
- [Bug] MOVELOC_UNAVAILABLE_ERROR is raised when the enum type is not copyable
- [Bug] Replace `requires` clauses with `aborts_if` in specs of public APIs
- [Bug][move-compiler-v2] Cannot infer type for `*(abort 0)` in vector
- [Feature Request] Use zeroize v1.7.0
- [Bug] Getting error when using aptos-framework main branch HOT 4
- [compiler-v2] v2 uses more stack space
- [compiler-v2] Type Safety verification fails with STLOC_TYPE_MISMATCH_ERROR
- [Bug] `explorer_transaction_link` produces incorrect result HOT 1
- [Bug] `aptos move compile --save-metadata --output-dir=..` saves metadata in the default output dir
- [Bug]
- [Bug]
- [Feature Request] [Compiler V2] Allow positional constructors and ".."s to appear in the LHS of an assignment
- [Bug] [Compiler-V2] Bug in Pattern Exhaustiveness Checking
- [Bug] Axios interception in request.ts interferes with other packages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aptos-core.