Skip to content

Commit

Permalink
correcting tests for issue #1179 - handling TypeCheckExpr
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed Jul 1, 2024
1 parent 3d15be0 commit 0be6813
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import com.intellij.codeInspection.ex.LocalInspectionToolWrapper;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.plugins.haxe.HaxeBundle;
import com.intellij.plugins.haxe.HaxeCodeInsightFixtureTestCase;
import com.intellij.plugins.haxe.ide.annotator.HaxeSemanticAnnotatorInspections;
Expand Down Expand Up @@ -431,12 +430,12 @@ public void testAssignTypeCheckFloatToInt() throws Exception {

// var a:Int = (10 : Float);
@Test
public void testInitializeIntWithIntTypeCheckedToFloat() throws Exception {
public void testInitializeIntWithTypeChecked() throws Exception {
doTestNoFixWithWarnings();
}

@Test
public void testAssignIntWithIntTypeCheckedToFloat() throws Exception {
public void testAssignWithTypeChecker() throws Exception {
doTestNoFixWithWarnings();
}

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This is a negative test; an error should NOT occur.
package;
class Test {
public function new() {
// The following is OK because an Int unifies with a Float
var f:Float = (10:Int);
// compiler error Float should be Int
var <error descr="Incompatible type: Float should be Int">i:Int = (10:Float)</error>;
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package;
class Test {
public function new() {
// The following is OK because an Int unifies with a Float
var f:Float = (10:Int);
// compiler error Float should be Int
var <error descr="Incompatible type: Float should be Int">i:Int = (10:Float)</error>;
}
}

0 comments on commit 0be6813

Please sign in to comment.