Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
13dac655
Commit
13dac655
authored
Sep 28, 2009
by
Russ Cox
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disallow interface {x, y()}
R=gri DELTA=8 (3 added, 0 deleted, 5 changed) OCL=35045 CL=35047
parent
fc61b777
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
doc/go_spec.html
doc/go_spec.html
+10
-7
No files found.
doc/go_spec.html
View file @
13dac655
...
...
@@ -49,7 +49,7 @@ and convert §Foo into §<a href="#Foo">Foo</a>:
<div
id=
"content"
>
<h1
id=
"The_Go_Programming_Language_Specification"
>
The Go Programming Language Specification
</h1>
<h1
id=
"The_Go_Programming_Language_Specification"
>
The Go Programming Language Specification
</h1>
<!-- The Table of Contents is automatically inserted in this <div>.
...
...
@@ -923,15 +923,16 @@ that is any superset of the interface. Such a type is said to
<pre
class=
"ebnf"
>
InterfaceType = "interface" "{" [ MethodSpecList ] "}" .
MethodSpecList = MethodSpec { ";" MethodSpec } [ ";" ] .
MethodSpec =
IdentifierList
Signature | InterfaceTypeName .
MethodSpec =
identifier
Signature | InterfaceTypeName .
InterfaceTypeName = TypeName .
</pre>
<pre>
// A simple File interface
interface {
Read, Write (b Buffer) bool;
Close ();
Read(b Buffer) bool;
Write(b Buffer) bool;
Close();
}
</pre>
...
...
@@ -972,7 +973,8 @@ to define an interface called <code>Lock</code>:
<pre>
type Lock interface {
Lock, Unlock ();
Lock();
Unlock();
}
</pre>
...
...
@@ -999,7 +1001,8 @@ in the interface.
<pre>
type ReadWrite interface {
Read, Write (b Buffer) bool;
Read(b Buffer) bool;
Write(b Buffer) bool;
}
type File interface {
...
...
@@ -4550,7 +4553,7 @@ Calls to <code>Alignof</code>, <code>Offsetof</code>, and
<p>
The functions
<code>
unsafe.Typeof
</code>
,
<code>
unsafe.Reflect
</code>
,
and
<code>
unsafe.Unreflect
</code>
allow access at run time to the dynamic
and
<code>
unsafe.Unreflect
</code>
allow access at run time to the dynamic
types and values stored in interfaces.
<code>
Typeof
</code>
returns a representation of
<code>
val
</code>
's
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment