forked from chapel-lang/chapel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add future for chapel-lang#26083 (chapel-lang#26084)
Adds new futures for chapel-lang#26083 Tested that futures pass locally [Reviewed by @mppf]
- Loading branch information
Showing
7 changed files
with
45 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
spec-insn-method-no-this.chpl:10: In method 'bar': | ||
spec-insn-method-no-this.chpl:11: error: 'x' used before defined | ||
spec-insn-method-no-this.chpl:16: note: defined here | ||
spec-insn-method-no-this.chpl:21: note: defined here |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
in specific R(int).foo, x=1 | ||
in specific R(int).bar, x=1 | ||
in specific R(int).baz, x=1 |
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,3 @@ | ||
spec-insn-type-method-no-this.chpl:11: In method 'bar': | ||
spec-insn-type-method-no-this.chpl:12: error: 't' used before defined | ||
spec-insn-type-method-no-this.chpl:22: note: defined here |
25 changes: 25 additions & 0 deletions
25
test/functions/ferguson/spec-insn-type-method-no-this.chpl
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,25 @@ | ||
// similar to spec-insn-method-no-this.chpl, but with type methods | ||
record R { | ||
type t; | ||
} | ||
|
||
proc type (R(int)).foo() { | ||
type tmp = this.t; | ||
writeln("in specific R(int).foo, x=", tmp:string); | ||
} | ||
|
||
proc type (R(int)).bar() { | ||
type tmp = t; // as above, t refers to field, `this` is implicit | ||
writeln("in specific R(int).bar, x=", tmp:string); | ||
} | ||
|
||
proc getR type do return R(int); | ||
proc type getR.baz() { | ||
type tmp = t; // as above, t refers to field, `this` is implicit | ||
writeln("in specific R(int).baz, x=", tmp:string); | ||
} | ||
|
||
type t = R(int); | ||
t.foo(); | ||
t.bar(); | ||
t.baz(); |
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,6 @@ | ||
bug: implicit this not working for type method on specific instantiation | ||
#26083 | ||
|
||
Field and method accesses get an implicit `this` added during scopeResolve, but | ||
for specific instantiations, scopeResolve does not do its usual work because | ||
the type of `this` is not known until functionResolution. |
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,3 @@ | ||
in specific R(int).foo, x=int(64) | ||
in specific R(int).bar, x=int(64) | ||
in specific R(int).baz, x=int(64) |