Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Fundamentals to Declarations [Draft] #4894
base: docs-restructure
Are you sure you want to change the base?
Fundamentals to Declarations [Draft] #4894
Changes from 35 commits
2f2a151
35f4442
ea1216f
01e2d00
fb32218
f219cb9
a1d1569
736d5f1
722c6b4
ad4cc67
506e10a
c9db19c
868df9d
ab6cf78
59f786f
4616b08
dea3657
c268553
1dfcaad
a7a058f
b0b64f9
4a533a5
423d07e
31cec71
fca412c
7765d0b
733458e
59c6ba2
ea8be8d
2aecba0
93cdf13
480a0a1
04ee43a
2587cdf
179e634
7e03619
d488c3d
a4d6332
1e8428e
97a59df
32604a1
2c23a6c
db1deda
94bc607
779701e
c51fce9
f2ba6da
f963f44
206b588
ec79380
1ca77bc
a64550b
16dce1c
061e2dc
f482fc5
6b3302c
7395f31
0460822
78bdcc4
84ddef1
b098633
42c7dc3
c5755bf
aa9691e
829c299
92f1be3
c5775a7
d28ae0c
8b8cfc7
b71be6f
d5ea317
6d9bf1d
de37a03
0dae779
0c7b2e9
cf36097
9d617a9
0837d56
b637481
1c7c838
b944cf7
e5830e6
b0c566d
edc0e55
b52b96e
96ab9e0
5454823
989a3d2
253ba88
42f3b8b
7252358
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is actually a compile time error (the type-checker checks the literal).
You'd want to do something more dynamic like 127 + n where n > 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type checker raises an error if a value larger than 127 is explicitly assigned to Int8. But I agree a more dynamic approach would be useful for cases where a value starts within bounds but is later reassigned to a larger number.
public func triggerOverflow() : async Int8 {
var a :Int8 = 28;
var b : Int8 = 100;
a += b ;
a
};
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.