Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cs444
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xun Yang
cs444
Commits
c1d70abd
Commit
c1d70abd
authored
5 years ago
by
Nicholas Robinson
Browse files
Options
Downloads
Patches
Plain Diff
fix multiple inherited abstract methods
- fix for Tests/A3/J1_supermethod_override11/
parent
e78369a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
TypeNodes.py
+7
-3
7 additions, 3 deletions
TypeNodes.py
with
7 additions
and
3 deletions
TypeNodes.py
+
7
−
3
View file @
c1d70abd
...
@@ -85,9 +85,13 @@ class ClassInterNode(ASTNode):
...
@@ -85,9 +85,13 @@ class ClassInterNode(ASTNode):
sicOverwritten
=
False
sicOverwritten
=
False
for
scc
in
superClassContains
:
for
scc
in
superClassContains
:
if
type
(
sic
)
==
type
(
scc
)
and
sic
==
scc
:
if
type
(
sic
)
==
type
(
scc
)
and
sic
==
scc
:
safeReplace
(
sic
,
scc
,
self
.
name
)
# sic is implicitly abstract, if scc is abstract, then it is not replacing sic
sicOverwritten
=
True
# Thus scc will be added to superContains as well (having 1+ abstract methods with same signiture is fine)
break
# Example: Tests/A3/J1_supermethod_override11/
if
'
abstract
'
not
in
scc
.
mods
:
safeReplace
(
sic
,
scc
,
self
.
name
)
sicOverwritten
=
True
break
if
not
sicOverwritten
:
if
not
sicOverwritten
:
superContains
.
append
(
sic
)
superContains
.
append
(
sic
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment