-
Notifications
You must be signed in to change notification settings - Fork 326
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
Initialize AtomConstructor's fields via local vars #3330
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
311cab0
Initialize AtomConstructor's fields via local vars
hubertp 0679e56
More docs
hubertp ea4c8e0
newline
hubertp f3054bb
Update CHANGELOG
hubertp 79d0202
Simplify InstantiateNode
hubertp c121563
Bonus test
hubertp dde151e
Cosmetic
hubertp e3d87e3
Update engine/runtime/src/main/java/org/enso/interpreter/node/express…
hubertp c9e639f
Update doc
hubertp a69ce08
Merge branch 'develop' into wip/hubert/default-arg-crash-181449213
hubertp bfef704
Merge branch 'develop' into wip/hubert/default-arg-crash-181449213
hubertp 4a59725
Merge branch 'develop' into wip/hubert/default-arg-crash-181449213
mergify[bot] 875fc1b
Merge branch 'develop' into wip/hubert/default-arg-crash-181449213
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -128,4 +128,5 @@ protected boolean isInstrumentable() { | |
public boolean isCloningAllowed() { | ||
return true; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 0 additions & 58 deletions
58
...ntime/src/main/java/org/enso/interpreter/node/expression/builtin/InstantiateAtomNode.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from Standard.Base import all | ||
import Standard.Test | ||
|
||
type Box | ||
type Foo (v : Bool = True) | ||
|
||
type Bar (a : Integer = 1) (b : Box = (Foo False)) (c : Boolean = b.v) | ||
|
||
type A a=0 b=1 | ||
type B a=2 b=(Foo True) | ||
type C a=3 b=Foo | ||
type D a=4 b=(Bar 1) | ||
type E a=5 b=a c=(b+1) | ||
type F a=6 b=(Foo False) c=(b.v) | ||
#type D a=4 b=Bar // will crash | ||
|
||
spec = | ||
Test.group "Atom Constructors" <| | ||
Test.specify "should be allowed to use primitive default arguments" <| | ||
x = A 1 | ||
x.b.should_equal 1 | ||
y = A 1 | ||
y.b.should_equal 1 | ||
|
||
Test.specify "should be allowed to use non-primitive default arguments" <| | ||
a = B 1 (Foo False) | ||
a.b.should_equal (Foo False) | ||
b = B 1 | ||
b.b.should_equal (Foo True) | ||
c = C 1 | ||
c.b.should_equal (Foo) | ||
d = D 1 | ||
d.b.b.should_equal (Foo False) | ||
d.b.c.should_equal False | ||
|
||
Test.specify "should be allowed to use default arguments that refer to previous parameters" <| | ||
e = E 1 | ||
e.b.should_equal 1 | ||
e.c.should_equal 2 | ||
f = F 1 | ||
f.c.should_equal False | ||
|
||
main = Test.Suite.run_main here.spec |
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.
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.
please run
scalafmt
on this file