Skip to content

Commit

Permalink
Fix infer_instance_accessor_ref test
Browse files Browse the repository at this point in the history
The test contained a typo which caused `dynamic` to be inferred by
accident.

[email protected]

Review-Url: https://codereview.chromium.org/2945603002 .
  • Loading branch information
stereotype441 committed Jun 16, 2017
1 parent f5ea0a4 commit b513e88
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class A {

class B {
C get c => null;
void set(C value) {}
void set c(C value) {}
}

class C {}
Expand All @@ -20,6 +20,6 @@ class D extends C {}

var /*@topType=A*/ a = new A();
var /*@topType=C*/ x = a. /*@target=A::b*/ b. /*@target=B::c*/ c;
var /*@topType=dynamic*/ y = a. /*@target=A::b*/ b.c ??= new D();
var /*@topType=C*/ y = a. /*@target=A::b*/ b. /*@target=B::c*/ c ??= new D();

main() {}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class B extends core::Object {
;
get c() → self::C
return null;
method set(self::C value) → void {}
set c(self::C value) → void {}
}
class C extends core::Object {
constructor •() → void
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class B extends core::Object {
;
get c() → self::C
;
method set(self::C value) → void
set c(self::C value) → void
;
}
class C extends core::Object {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class B extends core::Object {
;
get c() → self::C
return null;
method set(self::C value) → void {}
set c(self::C value) → void {}
}
class C extends core::Object {
constructor •() → void
Expand All @@ -28,5 +28,5 @@ class D extends self::C {
}
static field self::A a = new self::A::•();
static field self::C x = self::a.{self::A::b}.{self::B::c};
static field dynamic y = let final dynamic #t1 = self::a.{self::A::b} in let final dynamic #t2 = #t1.{self::B::c} in #t2.==(null) ? #t1.c = new self::D::•() : #t2;
static field self::C y = let final dynamic #t1 = self::a.{self::A::b} in let final dynamic #t2 = #t1.{self::B::c} in #t2.{core::Object::==}(null) ? #t1.{self::B::c} = new self::D::•() : #t2;
static method main() → dynamic {}

0 comments on commit b513e88

Please sign in to comment.