-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'upstream-develop' into fix/completion-hxml
- Loading branch information
Showing
11 changed files
with
183 additions
and
75 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
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
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
35 changes: 35 additions & 0 deletions
35
testData/annotation.semantic/AbstractAssignmentFromToFunctions.hx
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,35 @@ | ||
package; | ||
|
||
class AbstractAssignmentFromTo1 { | ||
public static function variableTests():Void { | ||
var val:FunctionFromTo = function(i:Int){return;}; | ||
var val:FunctionFrom = function(i:Int){return;}; | ||
|
||
var val:FunctionFromTo = testMethodIV; | ||
var val:FunctionFrom = testMethodIV; | ||
|
||
// should fail due to wrong parameter types | ||
var <error descr="Incompatible type: String->Int should be FunctionFromTo">val:FunctionFromTo = function(i:String){return 1;}</error>; | ||
var <error descr="Incompatible type: String->Int should be FunctionFrom">val:FunctionFrom = function(i:String){return 1;}</error>; | ||
var <error descr="Incompatible type: String->Void should be FunctionFromTo">val:FunctionFromTo = testMethodSV</error>; | ||
|
||
//should fail (has no from type or implisit casts) | ||
var <error descr="Incompatible type: Int->Void should be FunctionTo">val:FunctionTo = function(i:Int){return;}</error>; | ||
var <error descr="Incompatible type: Int->Void should be FunctionTo">val:FunctionTo = testMethodIV</error>; | ||
var <error descr="Incompatible type: Int->Void should be FunctionNon">val:FunctionNon = testMethodIV</error>; | ||
|
||
} | ||
|
||
public static function testMethodIV(i:Int) {return;} | ||
public static function testMethodSV(i:String) {return;} | ||
} | ||
|
||
|
||
|
||
abstract FunctionFromTo(Int->Void) from Int->Void to Int->Void {} | ||
|
||
abstract FunctionFrom(Int->Void) from Int->Void {} | ||
|
||
abstract FunctionTo(Int->Void) to Int->Void {} | ||
|
||
abstract FunctionNon(Int->Void) {} |
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,5 +1,5 @@ | ||
Haxe File | ||
IMPORT_STATEMENT | ||
HaxePsiToken:import('import') | ||
PsiErrorElement:ID expected | ||
PsiErrorElement:<expression> expected | ||
<empty list> |
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
Oops, something went wrong.