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
Original bug ID: 6182 Reporter:@lpw25 Assigned to:@alainfrisch Status: closed (set by @xavierleroy on 2015-12-11T18:24:09Z) Resolution: fixed Priority: normal Severity: feature Version: 4.01.0 Fixed in version: 4.02.0+dev Category: typing
Bug description
The attached patch (based on one by Stephen Dolan) gives a more accurate error message if you include virtual methods in an immediate object or class type.
Before:
class x = object method virtual m : int end;;
Characters 6-43:
class x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class should be virtual. The following methods are undefined : m
class type x = object method virtual m : int end;;
Characters 11-48:
class type x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class should be virtual. The following methods are undefined : m
let x = object method virtual m : int end;;
Characters 8-41:
let x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class should be virtual. The following methods are undefined : m
After:
class x = object method virtual m : int end;;
Characters 6-43:
class x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class should be virtual. The following methods are undefined : m
class type x = object method virtual m : int end;;
Characters 11-48:
class type x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class type should be virtual.
The following methods are undefined : m
let x = object method virtual m : int end;;
Characters 8-41:
let x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This object has virtual methods.
The following methods are undefined : m
Original bug ID: 6182
Reporter: @lpw25
Assigned to: @alainfrisch
Status: closed (set by @xavierleroy on 2015-12-11T18:24:09Z)
Resolution: fixed
Priority: normal
Severity: feature
Version: 4.01.0
Fixed in version: 4.02.0+dev
Category: typing
Bug description
The attached patch (based on one by Stephen Dolan) gives a more accurate error message if you include virtual methods in an immediate object or class type.
Before:
class x = object method virtual m : int end;;
Characters 6-43:
class x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class should be virtual. The following methods are undefined : m
class type x = object method virtual m : int end;;
Characters 11-48:
class type x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class should be virtual. The following methods are undefined : m
let x = object method virtual m : int end;;
Characters 8-41:
let x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class should be virtual. The following methods are undefined : m
After:
class x = object method virtual m : int end;;
Characters 6-43:
class x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class should be virtual. The following methods are undefined : m
class type x = object method virtual m : int end;;
Characters 11-48:
class type x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This class type should be virtual.
The following methods are undefined : m
let x = object method virtual m : int end;;
Characters 8-41:
let x = object method virtual m : int end;;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Error: This object has virtual methods.
The following methods are undefined : m
File attachments
The text was updated successfully, but these errors were encountered: