Comments (7)
Bitbucket user bbrodowsky commented on 2013-06-03 15:33
I think the documentation of "Seq()" clearly states that it is for non-empty sequences, for exactly the reason you mentioned, if I am not mistaken. So this should just throw an exception.
from silver.
@mschwerhoff commented on 2013-06-03 15:39
The syntax overview indeed describes Seq[Int]()
as the empty sequence
. It does not explicitly say that Seq(...)
must not be empty, but I guess you are right.
Unfortunately, parsing |Seq[Int]()|
yields Parse error: Failure: 'old' expected but 'S' found
.
from silver.
Bitbucket user bbrodowsky commented on 2013-06-03 15:42
I don't know the details of the parser and I did not work on it either, so I don't know what our problem here. I just remembered this thing about empty sequences.
from silver.
@alexanderjsummers commented on 2013-11-20 17:32
nicest (in my opinion) would be to be able to leave a kind of unification (type) variable, which could be determined later in type-checking. That might not be so easy (depending on how the type-checker currently works), but it's kind of annoying to have to write SeqInt in cases where the type is determined by the context.
In theory, one could carry around an environment mapping such variables to instantiations found so far during type-checking. If the whole type-checking goes through without instantiating such a variable, then its instantiation really doesn't matter for the program, and we could just pick some default (Ref / Int). Of course, leaving the unbound type variable is not a good option for downstream tools.
from silver.
Bitbucket user mnovacek on 2014-05-21 09:47:
- changed the assignee from (none) to bitbucket user juhaszu
from silver.
Bitbucket user juhaszu commented on 2014-05-28 12:33
Modified syntax so that empty collections require an explicit type
from silver.
Bitbucket user juhaszu on 2014-05-28 12:33:
- changed
state
fromnew
toresolved
from silver.
Related Issues (20)
- Avoid linear scans in Program.find* methods HOT 3
- Slow pretty-printer and consistency checks
- Asserting quantified permission not supported in Carbon HOT 2
- Support for special Z3 relations HOT 1
- Can ensure false as the post-condition of a function HOT 2
- Incorrect field assignments crash Viper
- The semantics of permission introspection in the body of unfolding expressions is unclear
- Trigger inference infers invalid triggers HOT 4
- Silicon not using variables assigned through let statements
- Decreases in method giving error: Verification aborted exceptionally HOT 4
- Empty ADT causes "unsoundness" HOT 1
- Parser and pretty-printer do not preserve scopes HOT 1
- Wildcard permission can be interpreted as greater than one HOT 2
- Termination Plugin: Generates ill-formed Viper code for input with let expressions HOT 2
- Resources can be used on left of implication in assumes
- Missing hashCode definitions
- Crash parsing predicate access with no arguments in `assume` HOT 1
- No non-pure check for predicate access arguments
- Is it intentional that adt exclusivity is not enforced? HOT 1
- Generic domain function application needs trivial type variable map with uninsightful error message
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 silver.