Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: X10 2.1.2
-
Fix Version/s: None
-
Component/s: X10 Compiler: Front-end Typechecking
-
Labels:None
-
Number of attachments :
Description
class TestOverridingAndHasType {
class A {
def m():Int = 1;
def t():Int = 1;
def p():Double = 1;
}
class B extends A {
def m() {throw new Exception(); } // ShouldNotBeERR
def t() <: Int { throw new Exception(); } // ShouldNotBeERR ShouldNotBeERR
def p() = 2; // ShouldNotBeERR
}
class C {
def m() { throw new Exception(); } // infers void
def m1():void { throw new Exception(); }
def m2():Int { throw new Exception(); }
def m3() <: Int {throw new Exception(); } // ShouldNotBeERR
def m4() <: void {throw new Exception(); }
}
}
Issue Links
- duplicates
-
XTENLANG-1584
Inference should look at the method we are overriding.
-
- is depended upon by
-
XTENLANG-2584
X10 2.2 frontend issues (umbrella)
-
-
XTENLANG-2439
X10 2.2 language design decisions (umbrella)
-
- is related to
-
XTENLANG-2480
Type bounds do not play nice with coercions
-