diff options
Diffstat (limited to 'test/files/pos/fields_widen_trait_var.scala')
-rw-r--r-- | test/files/pos/fields_widen_trait_var.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/files/pos/fields_widen_trait_var.scala b/test/files/pos/fields_widen_trait_var.scala new file mode 100644 index 0000000000..0ea9d9629a --- /dev/null +++ b/test/files/pos/fields_widen_trait_var.scala @@ -0,0 +1,4 @@ +// check that the `var x` below is assigned the type `Int`, and not `Constant(0)`, +// and that we can assign to it (if it gets a constant type, the `x` in `x = 42` +// is constant-folded to `0` and we can't find a setter.. +trait C { protected final var x = 0; x = 42 } |