-
Notifications
You must be signed in to change notification settings - Fork 620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Matlab classes #1791
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,9 @@ | ||
A input.m /^A = magic(4);$/;" v | ||
R input.m /^R = randn(3,4,5);$/;" v | ||
class1 input.m /^classdef class1 < handle$/;" c | ||
classfunc1 input.m /^ function [x,y,z] = classfunc1$/;" f | ||
classfunc2 input.m /^ function x = classfunc2$/;" f | ||
classfunc3 input.m /^ function classfunc3$/;" f | ||
func1 input.m /^function [x,y,z] = func1 $/;" f | ||
func2 input.m /^function x = func2 $/;" f | ||
func3 input.m /^function func3 $/;" f |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,12 @@ | ||
classdef class1 < handle | ||
methods | ||
function [x,y,z] = classfunc1 | ||
function x = classfunc2 | ||
function classfunc3 | ||
end | ||
end | ||
end | ||
|
||
function [x,y,z] = func1 | ||
function x = func2 | ||
function func3 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you update the test case for testing what you wrote:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done: I added the two missing function types of this kind as class methods. |
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a question. Here "handle" is the super class of "class1"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is correct. The
handle
class is actually a special class, changing the semantics of the derived class.