Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
inox
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
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
LARA
inox
Commits
e87bc60e
Commit
e87bc60e
authored
15 years ago
by
Philippe Suter
Browse files
Options
Downloads
Patches
Plain Diff
No commit message
No commit message
parent
769a04ec
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/funcheck/AnalysisComponent.scala
+14
-9
14 additions, 9 deletions
src/funcheck/AnalysisComponent.scala
src/funcheck/purescala/Trees.scala
+1
-0
1 addition, 0 deletions
src/funcheck/purescala/Trees.scala
with
15 additions
and
9 deletions
src/funcheck/AnalysisComponent.scala
+
14
−
9
View file @
e87bc60e
...
...
@@ -64,18 +64,23 @@ class AnalysisComponent(val global: Global, val pluginInstance: FunCheckPlugin)
def
unsup
(
s
:
String
)
:
String
=
"FunCheck: Unsupported construct: "
+
s
tree
match
{
case
ClassDef
(
mods
,
name
,
tparams
,
impl
)
=>
{
if
(
mods
.
isTrait
)
unit
.
error
(
tree
.
pos
,
unsup
(
"trait."
))
}
case
c
@
ClassDef
(
mods
,
name
,
tparams
,
impl
)
=>
{
val
s
=
c
.
symbol
println
(
s
)
if
(
s
.
isTrait
)
unit
.
error
(
tree
.
pos
,
unsup
(
"trait."
))
else
if
(
s
.
isModule
)
println
(
"Seems like "
+
name
+
" is an object."
)
else
if
(
s
.
isClass
&&
!(
mods
.
isCase
||
mods
.
isAbstract
))
unit
.
error
(
tree
.
pos
,
unsup
(
"non-abstract, non-case class."
))
}
case
ValDef
(
mods
,
name
,
tpt
,
rhs
)
if
mods
.
isVariable
=>
unit
.
error
(
tree
.
pos
,
unsup
(
"mutable variable/field."
))
case
LabelDef
(
name
,
params
,
rhs
)
=>
;
// used for tailcalls and like
// while/do are desugared to label defs as follows:
// while (cond) body ==> LabelDef($L, List(), if (cond) { body; L$() } else ())
// do body while (cond) ==> LabelDef($L, List(), body; if (cond) L$() else ())
case
LabelDef
(
name
,
params
,
rhs
)
=>
unit
.
error
(
tree
.
pos
,
unsup
(
"loop."
))
case
Assign
(
lhs
,
rhs
)
=>
unit
.
error
(
tree
.
pos
,
unsup
(
"assignment to mutable variable/field."
))
case
Return
(
expr
)
=>
unit
.
error
(
tree
.
pos
,
unsup
(
"return statement."
))
case
Try
(
block
,
catches
,
finalizer
)
=>
unit
.
error
(
tree
.
pos
,
unsup
(
"try block."
))
...
...
This diff is collapsed.
Click to expand it.
src/funcheck/purescala/Trees.scala
+
1
−
0
View file @
e87bc60e
...
...
@@ -67,6 +67,7 @@ see examples in:
case
class
MapType
(
from
:
TypeTree
,
to
:
TypeTree
)
extends
TypeTree
case
class
ClassType
(
id
:
Identifier
)
extends
TypeTree
case
class
CaseClassType
(
id
:
Identifier
)
extends
TypeTree
case
class
OptionType
(
base
:
TypeTree
)
extends
TypeTree
// Definitions
...
...
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