-
Notifications
You must be signed in to change notification settings - Fork 279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Static type checking of EvaluatesTo
not working
#2001
Labels
Comments
mversic
added
Bug
Something isn't working
iroha2-dev
The re-implementation of a BFT hyperledger in RUST
labels
Mar 23, 2022
@appetrosyan, @mversic if we look at: impl<V: TryFrom<Value>, E: Into<ExpressionBox>> From<E> for EvaluatesTo<V> {
fn from(expression: E) -> Self {
Self {
expression: expression.into(),
_value_type: PhantomData::default(),
}
}
} Nothing prevent us from having: impl From<AssetDefinitionId> for EvaluatesTo<AccountId> {
fn from(expression: AssetDefinitionId) -> Self {
Self {
// AssetDefinitionId into ExpressionBox
expression: expression.into(),
_value_type: PhantomData::default(),
}
}
}
impl From<AccountId> for EvaluatesTo<AccountId> {
fn from(expression: AccountId) -> Self {
Self {
// AccountId into ExpressionBox
expression: expression.into(),
_value_type: PhantomData::default(),
}
}
} EDIT: so the problem is that when we require type |
appetrosyan
pushed a commit
that referenced
this issue
Aug 16, 2022
Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
mversic
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 6, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
mversic
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 6, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
mversic
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 6, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
mversic
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 7, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
BAStos525
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 7, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com> Signed-off-by: BAStos525 <jungle.vas@yandex.ru>
mversic
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 8, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
mversic
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 9, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
mversic
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 9, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
BAStos525
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 9, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
mversic
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 9, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
BAStos525
pushed a commit
to mversic/iroha
that referenced
this issue
Sep 9, 2022
…hyperledger-iroha#2582) Signed-off-by: Daniil Polyakov <arjentix@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I've noticed that our type checking of
EvaluatesTo
is not giving out compile errors when it is expected to do so.The following test should not compile, yet it does:
Notice that
client::asset::by_account_id
as it's argument acceptsimpl Into<EvaluatesTo<AccountId>>
, yet when givenAssetDefinitionId
it still compiles as if there is an implementationAssetDefinitionId: Into<AccountId>
.The text was updated successfully, but these errors were encountered: