-
-
Notifications
You must be signed in to change notification settings - Fork 658
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[java/cs] Make sure to collect the right type parameters on anonymous…
… functions Closes #5793
- Loading branch information
Showing
2 changed files
with
31 additions
and
0 deletions.
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package unit.issues; | ||
|
||
class Issue5793 extends Test { | ||
public function test() { | ||
function run1() { | ||
function foo <T> (expected:Array<T>, a:T) { | ||
eq(expected[0], a); | ||
} | ||
foo([2], 2); | ||
} | ||
run1(); | ||
|
||
function run2() { | ||
function bar<A>(expected:Array<A>, a:A) { | ||
function baz<B>(expected:Array<B>, b:B) { | ||
eq(expected[0], b); | ||
} | ||
baz(expected,a); | ||
} | ||
bar([42],42); | ||
} | ||
run2(); | ||
} | ||
} |