mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-22 22:44:47 +03:00
new double nested external records test
This commit is contained in:
parent
1f6e39aaec
commit
e7fa88cfe4
44
tests/expectations/compiler/structs/external_record.out
Normal file
44
tests/expectations/compiler/structs/external_record.out
Normal file
@ -0,0 +1,44 @@
|
||||
---
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
outputs:
|
||||
- - compile:
|
||||
- initial_symbol_table: 545b44c39cf8f1a72b9c4d8a8e0e86235e007774fb1bd186debb975a2f32b7aa
|
||||
type_checked_symbol_table: bf7335fb6140ebe55ca4a42bde0214788573f73e72bef8830bd59e90376734ce
|
||||
unrolled_symbol_table: bf7335fb6140ebe55ca4a42bde0214788573f73e72bef8830bd59e90376734ce
|
||||
initial_ast: f9f5ea5840152c333d9fca99c2620fb8de52416f1c640e0c6cff277d6943ac7e
|
||||
unrolled_ast: f9f5ea5840152c333d9fca99c2620fb8de52416f1c640e0c6cff277d6943ac7e
|
||||
ssa_ast: cea6a49274e2713fb9faae9f2971eb6417ab9bb177b0120f2fc382347fd0d8bb
|
||||
flattened_ast: 808edbcaeee7d480eafe06edb859fa98bd845af040a327775030226301f7d335
|
||||
destructured_ast: 8989c84c5b8bdd77062aa6cf8088b7f22402519031e04b1587a767f447d5d2d3
|
||||
inlined_ast: 8989c84c5b8bdd77062aa6cf8088b7f22402519031e04b1587a767f447d5d2d3
|
||||
dce_ast: 8989c84c5b8bdd77062aa6cf8088b7f22402519031e04b1587a767f447d5d2d3
|
||||
bytecode: 6341f6fcccbfa86b71e0eac445b9d0ee558c74ef896183ee82b456b9e7fb2270
|
||||
errors: ""
|
||||
warnings: ""
|
||||
- initial_symbol_table: 94433ed1e8aa5806aa62be4686823196c98fdbfc2eda03ec27c0e64cf3680d33
|
||||
type_checked_symbol_table: 0ded0a96a413f10496b70b1bafebb314dde966e820c84458bff93519500c14a7
|
||||
unrolled_symbol_table: 0ded0a96a413f10496b70b1bafebb314dde966e820c84458bff93519500c14a7
|
||||
initial_ast: d04f419d0f1da3643db1d89309218af0c95a3d013cc8c72ddd97f3accb9aae0f
|
||||
unrolled_ast: 586712c8e78e48ca6bd80170b69d69acc10e29628edca024966196b1e925d226
|
||||
ssa_ast: d7606102a66d5a0b25a65bfa37601daa7fce6b20827167f0d64ff05c893f5d55
|
||||
flattened_ast: cf22b6a0effbcb2eb68400c643e12eead70bd5c67f53389692d1c71303977ad4
|
||||
destructured_ast: 7d46bab0613f98bc4425b7067bdbf9c60e2438e65e5c28e40f184f8bcd95663f
|
||||
inlined_ast: 7d46bab0613f98bc4425b7067bdbf9c60e2438e65e5c28e40f184f8bcd95663f
|
||||
dce_ast: 7d46bab0613f98bc4425b7067bdbf9c60e2438e65e5c28e40f184f8bcd95663f
|
||||
bytecode: e902cc1e73a94c6024944460951f6207587ed939584c016908554b23280b94ec
|
||||
errors: ""
|
||||
warnings: ""
|
||||
- initial_symbol_table: 1793d240178a2f91ae3c753e1f3b3c2d330e9ab03cff6504a7862b2985b8cbeb
|
||||
type_checked_symbol_table: c9e5ce2897b3371bb29f9ac317ecae232752f1d1bafe5c44f856c766ecd656a6
|
||||
unrolled_symbol_table: c9e5ce2897b3371bb29f9ac317ecae232752f1d1bafe5c44f856c766ecd656a6
|
||||
initial_ast: a15baf7d1cc60b6ab5aebef939f5800752a774872e9e9d1553d8cc1c499e32d9
|
||||
unrolled_ast: 7299cc3184ba18d489de2894497284531ed7aa327f9e2d0210753c5c22bc16d9
|
||||
ssa_ast: 0ea3ba36176e76b9b6495453b8dd3c6c7b8582f59f8a29038533fb3bde7185e7
|
||||
flattened_ast: 068ad7f03c5f586ce701d75a9a23a0be6f6b9d6c35e9ed0f912ed716a3988d41
|
||||
destructured_ast: a6ab9fa3b56e31cdb5ee362d71957ea54736dbd056a2956aafd2578a94d0ad38
|
||||
inlined_ast: a6ab9fa3b56e31cdb5ee362d71957ea54736dbd056a2956aafd2578a94d0ad38
|
||||
dce_ast: a6ab9fa3b56e31cdb5ee362d71957ea54736dbd056a2956aafd2578a94d0ad38
|
||||
bytecode: b92b0c5017841d1c4ace13f7b040b9b7f84174bf74d49b8472f5f101f0d6caf8
|
||||
errors: ""
|
||||
warnings: ""
|
@ -29,16 +29,16 @@ outputs:
|
||||
bytecode: 5a1ca0038e83880d6d2cd5413ca4e8ec01e2622d635d6d8b2cb64463cd5c4817
|
||||
errors: ""
|
||||
warnings: ""
|
||||
- initial_symbol_table: e80a77083f229ce01b84834841c3e7d330ad78706aee47f6fc42141cf7f77cec
|
||||
type_checked_symbol_table: 5958f63685c7956cdc25d43d19b292ef961f29bf0ec690e8b73afc1c47fdda7c
|
||||
unrolled_symbol_table: 5958f63685c7956cdc25d43d19b292ef961f29bf0ec690e8b73afc1c47fdda7c
|
||||
initial_ast: 5ca5cf48edf7f39b3354b62a6734f405deddccdd8410aa08daed5658c9a79b53
|
||||
unrolled_ast: 36b9c5c7c81ec9def1ef719adadced944756ddea840d29686cb47c0cfa1e81c5
|
||||
ssa_ast: dd9bf2ce3d140495623090b88a85d5a3c574218e79952ffeb859ec8d34d538de
|
||||
flattened_ast: 88c2918ebbf795fdb8a45c751abcec24026aeaecbac32b36e83b5e7bc19bb366
|
||||
destructured_ast: ee0c8933257d1577e4a6bd78eda5c989a9f02df7603949407a0f71a53a66301a
|
||||
inlined_ast: ee0c8933257d1577e4a6bd78eda5c989a9f02df7603949407a0f71a53a66301a
|
||||
dce_ast: ee0c8933257d1577e4a6bd78eda5c989a9f02df7603949407a0f71a53a66301a
|
||||
bytecode: 641b261d2641bab7d3bc2b54ddbaf507988552b5488bd1d33a88de17edc33d42
|
||||
- initial_symbol_table: 79d90634b478abc3e148c20ff90bfe9c0083d101f48d1c4d94afb79f64942644
|
||||
type_checked_symbol_table: 9d247b6c68aaabb4dc45b63453a743c1749bd8aaa219ab0496423d3988a37711
|
||||
unrolled_symbol_table: 9d247b6c68aaabb4dc45b63453a743c1749bd8aaa219ab0496423d3988a37711
|
||||
initial_ast: 070bd43d4107a130483d632bc8165a334086e1438d5e1fc0e8b654bab1d4685e
|
||||
unrolled_ast: 81d58c4b860d8c17a4ebb26e34d43e5290c621494deccbf942e382e5d01366c1
|
||||
ssa_ast: b9e6f20c75176b67237fe22a4e443a785935dfea77b78312618e04bc7fc90980
|
||||
flattened_ast: 8fc36264012c04ecd01716682783ab63576a1681e3aef8e5d1c9e6725e784239
|
||||
destructured_ast: 1d3a771916a7d4db86a78a83d97cda890277498c5a8b9a5b593c1f1cc3bf6685
|
||||
inlined_ast: 1d3a771916a7d4db86a78a83d97cda890277498c5a8b9a5b593c1f1cc3bf6685
|
||||
dce_ast: dc6d50ca5757e38de65b4d1e1dfd173a9ee56d423c417bbd813205369790ce98
|
||||
bytecode: 81e7b663dbb9d60c89b80b448c71ada9bdc7a93fac808bd8d1b6ca3ab053f914
|
||||
errors: ""
|
||||
warnings: ""
|
||||
|
42
tests/tests/compiler/structs/external_record.leo
Normal file
42
tests/tests/compiler/structs/external_record.leo
Normal file
@ -0,0 +1,42 @@
|
||||
/*
|
||||
namespace: Compile
|
||||
expectation: Pass
|
||||
*/
|
||||
|
||||
program child.aleo {
|
||||
record A {
|
||||
owner: address,
|
||||
val: u32,
|
||||
}
|
||||
transition mint(owner: address, val: u32) -> A {
|
||||
return A {owner: owner, val: val};
|
||||
}
|
||||
}
|
||||
|
||||
// --- Next Program --- //
|
||||
|
||||
import child.aleo;
|
||||
program parent.aleo {
|
||||
record B {
|
||||
owner: address,
|
||||
val: u32,
|
||||
}
|
||||
transition wrapper_mint(owner: address, val: u32) -> (child.aleo/A, B) {
|
||||
return (child.aleo/mint(self.caller, 1u32), B {owner: self.caller, val: val});
|
||||
}
|
||||
}
|
||||
|
||||
// --- Next Program --- //
|
||||
|
||||
import child.aleo;
|
||||
import parent.aleo;
|
||||
program grandparent.aleo {
|
||||
record C {
|
||||
owner: address,
|
||||
val: u32,
|
||||
}
|
||||
transition double_wrapper_mint(owner: address, val: u32) -> (child.aleo/A, parent.aleo/B, C) {
|
||||
let (a,b): (child.aleo/A, parent.aleo/B) = parent.aleo/wrapper_mint(owner,val);
|
||||
return (a, b, C {owner: owner, val: val});
|
||||
}
|
||||
}
|
@ -75,8 +75,8 @@ program grandparent.aleo {
|
||||
return a;
|
||||
}
|
||||
|
||||
///transition omega_wrapper() -> (Foo, child.aleo/Boo, parent.aleo/BooHoo, Woo) {
|
||||
/// let (f, b, bh, w): (Foo, child.aleo/Boo, parent.aleo/BooHoo, Woo) = parent.aleo/create_another_wrapper();
|
||||
/// return parent.aleo/create_another_wrapper();
|
||||
///}
|
||||
transition omega_wrapper() -> (Foo, child.aleo/Boo, parent.aleo/BooHoo, Woo) {
|
||||
let (f, b, bh, w): (Foo, child.aleo/Boo, parent.aleo/BooHoo, Woo) = parent.aleo/create_another_wrapper();
|
||||
return parent.aleo/create_another_wrapper();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user