-
-
Notifications
You must be signed in to change notification settings - Fork 671
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
only bind known type parameters to monomorphs in definition mode (#11658
- Loading branch information
Showing
10 changed files
with
57 additions
and
5 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
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,9 @@ | ||
interface Foo { | ||
function bar<T>():T; | ||
} | ||
|
||
class Bar implements Foo { | ||
public function bar<T>() return null; // Error: write_full_path hxb writer failure | ||
} | ||
|
||
function main() {} |
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,9 @@ | ||
interface Foo { | ||
function baz<T>():T; | ||
} | ||
|
||
class Bar implements Foo { | ||
public function baz<T>():T return null; // this is fine | ||
} | ||
|
||
function main() {} |
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,9 @@ | ||
interface Foo { | ||
function foo<T>():T; | ||
} | ||
|
||
class Bar implements Foo { | ||
public function foo() return null; // Warning: Unbound type parameter foo.T | ||
} | ||
|
||
function main() {} |
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,2 @@ | ||
--main MainBar | ||
--interp |
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,5 @@ | ||
MainBar.hx:6: characters 18-21 : Field bar has different type than in Foo | ||
MainBar.hx:2: characters 11-14 : ... Interface field is defined here | ||
MainBar.hx:6: characters 18-21 : ... error: Null<Unknown<0>> should be bar.T | ||
MainBar.hx:6: characters 18-21 : ... have: (...) -> Null<...> | ||
MainBar.hx:6: characters 18-21 : ... want: (...) -> bar.T |
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,2 @@ | ||
--main MainBaz | ||
--interp |
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,2 @@ | ||
--main MainFoo | ||
--interp |
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,5 @@ | ||
MainFoo.hx:6: characters 18-21 : Field foo has different type than in Foo | ||
MainFoo.hx:2: characters 11-14 : ... Interface field is defined here | ||
MainFoo.hx:6: characters 18-21 : ... error: Null<Unknown<0>> should be foo.T | ||
MainFoo.hx:6: characters 18-21 : ... have: (...) -> Null<...> | ||
MainFoo.hx:6: characters 18-21 : ... want: (...) -> foo.T |