You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Google Issue #56 : https://code.google.com/p/haxe/issues/detail?id=56] by jdonald...@gmail.com, at 04/02/2010, 14:48:46 What steps will reproduce the problem?
Type constraints allow comparisons for Floats, but not for Ints. The code
at the bottom will work if it is rewritten as:
class Test<T:Float>{...}
but does not work as is.
What is the expected output? What do you see instead?
I thought this should compile properly. Instead, this is the error:
> return this.x > x;
src/Test.hx:8: characters 9-19 : Cannot compare Test.T and Test.T
Please complete the following class with minimal code reproducing the problem :
class Test<T:Int>{
private var x:T;
public function new(x:T){
this.x = x;
}
public function compare(x:T){
return this.x > x;
}
public static function main(): Void
{
var f = new Test<Int>(5);
}
}
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
* [tests] add tests for indexOf/lastIndexOf
* [python] make indexOf and lastIndexOf ecma compliant when str is empty
* [php] fix indexOf and lastIndexOf if search string is ""
* [neko] fix indexOf and lastIndexOf if search string is ""
* [cs] fix indexOf and lastIndexOf if search string is ""
* [lua] conform to String.indexOf spec (#56)
* [python] don't inline StringImpl#lastIndexOf/#indexOf (#55)
Because their method body is quite big.
* fix merge mishap
* fix JVM, ignore flash
* fix
* dodge lua
---------
Co-authored-by: frabbit <frabbit77@googlemail.com>
Co-authored-by: Justin Donaldson <jdonaldson@gmail.com>
Co-authored-by: Sebastian Thomschke <sebthom@users.noreply.github.com>
[Google Issue #56 : https://code.google.com/p/haxe/issues/detail?id=56]
by jdonald...@gmail.com, at 04/02/2010, 14:48:46
What steps will reproduce the problem?
Type constraints allow comparisons for Floats, but not for Ints. The code
at the bottom will work if it is rewritten as:
class Test<T:Float>{...}
but does not work as is.
What is the expected output? What do you see instead?
I thought this should compile properly. Instead, this is the error:
> return this.x > x;
src/Test.hx:8: characters 9-19 : Cannot compare Test.T and Test.T
Please complete the following class with minimal code reproducing the
problem :
Please provide any additional information below.
The text was updated successfully, but these errors were encountered: