Comments (4)
Can you write a seman
testcase that should pass and add to test/fail
?
from virgil.
I've been reading the type checking code in vst/Verifier.v3
and I don't understand why the ve.expr
has to be null
, i.e. why the match case has to be the unqualified type (see these lines).
from virgil.
For the error generated by test/fail/adt_type_infer03.v3
(in PR), I think the TypeSystem.isPromotable()
should return true
because, well A<u4>.C
and A<u8>.C
are the exact same type. Unless is there some internal representation issue? Even then it should just be equal, no?
EDIT: Or well, more precisely the TypeSystem.isSubtype()
for variants needs updating.
from virgil.
This is a subtle thing that needs to be explained better. Integer types like u4
and u8
are not related by subtyping but by promotion. That is because they could be represented differently. E.g. on a 32-bit machine a u32
will be represented by one word and u64
two words. Subtyping is only for values whose representation doesn't change when assigning a value from a subtype to a supertype location (i.e. the assignment is always pass-through, nop).
from virgil.
Related Issues (20)
- Add Windows batch scripts for JAR and WASM target HOT 1
- Supporting `unsafe` as a keyword? HOT 2
- Mutability of `def var` fields in subclasses HOT 3
- Support socket flags/options
- Change system and pointer APIs to pervasively use the `Range` type HOT 2
- Copy/modify initialization expression - `with`?
- Weakening `private` to file scope HOT 4
- Shard testsuite and parallelize
- Support Windows 64 bit
- Most of documentation files seem to be empty HOT 1
- CI Scripts don't report failure properly
- make fails in the virgil folder HOT 6
- Git conflict markers in tests HOT 4
- Exclude code from compilation HOT 2
- Array type init with a negative value. HOT 4
- macos x86_64 11.7.10 build failed HOT 3
- Online documentation
- New PDF URL to one of the research papers HOT 1
- RFC: Choice Types
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 virgil.