Ability to assert over shared attributes
See original GitHub issueI’m trying to do this:
shared class Foo(X val){
shared Y y;
assert(exists y = val.possiblyY());
}
And well, it’s not allowed, so I have to do this stupid code:
shared class Foo(X val){
assert(exists y_ = val.possiblyY());
shared Y y = y_;
}
Is it something we could allow or is there another way to do this?
Issue Analytics
- State:
- Created 8 years ago
- Comments:14 (13 by maintainers)
Top Results From Across the Web
Can I assert that a C# method has a certain attribute?
Yes, with reflection. One possible solution: var dummyAttribute = typeof(YourClassName) .GetMethod(nameof(YourClassName.DummyMethod))! .
Read more >Assertion Grammars - W3C
This specification provides a basis for defining a group of documents sharing a common syntax for elements and attributes.
Read more >Power Assertion Parenting & Effects of This Discipline Style
This disciplinary method draws on the parent's physical control and power over material resources.
Read more >Assertion - Stanford Encyclopedia of Philosophy
We make assertions to share information, coordinate our actions, defend arguments, and communicate our beliefs and desires. Because of its ...
Read more >Erik Erikson's 8 Stages of Psychosocial Development
The child begins to assert control and power over their environment by planning activities, accomplishing tasks and facing challenges. Success at this stage ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Or a
stef
expression:Where
stef
has the same powers asassert
but with a cooler name. Ties in well with my other issue aboutassert
in comprehensions…Bumped into this issue today